You are on page 1of 31

Linear Algebra

Dr. Bui Xuan Dieu

School of Applied Mathematics and Informatics,


Hanoi University of Science and Technology

Dr. Bui Xuan Dieu Linear Algebra 1 / 30


Matrices

Chapter 2: Matrices - Determinants - System of Linear


Equations

1 Matrices

2 Determinant

3 Rank of a matrix, Invertible matrix

4 System of linear equations

Dr. Bui Xuan Dieu Linear Algebra 2 / 30


Matrices

Matrices
Definition
A matrix is a rectangular array of numbers.
 
a11 a12 · · · a1n

a
 21 a22 · · · a2n 

A=
 .. .. .. .. 
 . . . . 

am1 an2 · · · amn

Most of this lecture focuses on real and complex matrices, that is, matrices
whose elements are real numbers or complex numbers, respectively.

i) The size of a matrix is defined by the number of its rows and columns.
A matrix with m rows and n columns is called an m × n matrix.
ii) Matrices with a single row are called row vectors, and those with a
single column are called column vectors.
iii) m = n ⇒ square matrix.
Dr. Bui Xuan Dieu Linear Algebra 3 / 30
Matrices

Operations on matrices

1) Matrix Adddition

(aij )m×n + (bij )m×n = (aij + bij )m×n .

2) Scalar Multiplication

k(aij )m×n = (kaij )m×n .

3) Transposition
(aij )T
m×n = (aji )n×m .

4) Matrix Multiplication: Let A ∈ Mm,n , B ∈ Mn,k . The matrix C


defined by
n
X
cij = aij bjk
j=1

is called the product of A and B, denoted C = AB.


Dr. Bui Xuan Dieu Linear Algebra 4 / 30
Matrices

Properties


 k(A + B) = kA + kB
A+B =B+A
 

 
(k + h)A = kA + hA = A

 

A + 0 = 0 + A = A
 
1. 2. k(hA) = (kh)A
A + (−A) = (−A) + A = 0 
1.A = A

 

 
(A + B) + C = A + (B + C )
 

0.A = 0

 


(AB)C = A(BC ) 

A(B + C ) = AB + AC )
 
AI = IA = A
 (A + B)C = AC + BC

3. 4.


where I is the identity matrix 

(AB)C = A(BC )
 
Note that AB =

6 BA k(BC ) = (kB)C = B(kC )

5. (AB)T = B T AT

Dr. Bui Xuan Dieu Linear Algebra 5 / 30


Matrices

Examples

Example
Find "the matrix# "
X such that:
# " #
1 2 3 0 1 −2
a) + 2X =
−3 4 2 1 5 7
    
1 −3 2 2 5 6 0 −6 6
b) 21 X −  3 −4 1   1 2 5  =  −2 9 2 
    
2 −5 3 1 3 2 −4 −8 6

Example
Compute An , where
" #  
cos a − sin a a 1 0
a) A =
sin a cos a b) A =  0 a 1 
 
0 0 a

Dr. Bui Xuan Dieu Linear Algebra 6 / 30


Matrices

Invertible Matrix

Definition
An n-by-n square matrix A is called invertible (also nonsingular or
nondegenerate) if there exists an n-by-n square matrix B such that

AB = BA = I

If this is the case, then the matrix B is uniquely determined by A and is


called the inverse of A, denoted by A−1 .

Example
!
1 2
Find the inverse matrix of A = .
3 4

Dr. Bui Xuan Dieu Linear Algebra 7 / 30


Determinant

Chapter 2: Matrices - Determinants - System of Linear


Equations

1 Matrices

2 Determinant

3 Rank of a matrix, Invertible matrix

4 System of linear equations

Dr. Bui Xuan Dieu Linear Algebra 8 / 30


Determinant

Determinant
Determinant
The determinant of a matrix A is denoted det A, or |A|.
1) 1-square matrix det(a) = a,
!
a b
2) 2-square matrix det = ad − bc,
c d
3) 3-square matrix

a b c ✷ ✷ ✷ ✷ ✷ ✷ ✷ ✷ ✷

|A| = d e f = a ✷ e f − b d ✷ f + c d e ✷ .

g h i ✷ h i g ✷ i g h ✷

4) n-square matrix, n ≥ 3:

det(aij )n×n = a11 det M11 − a12 det A12 + · · · + (−1)n+1 a1n det M1n ,

where Mij are minors.


Dr. Bui Xuan Dieu Linear Algebra 9 / 30
Determinant

Determinant

Properties
1) det I = 1.
2) det A = det AT ,i.e., if a property is true for columns, so is it for rows.
3) The Laplace formula:
n
X n
X
det A = (−1)i+j aij det Mij = (−1)i+j aij det Mij ,
j=1 i=1

where Mij are the minors.


1
4) det(AB) = det A det B ⇒ det(A−1 ) = det A .
5) If A is a triangular matrix, then its determinant equals the product of
the diagonal entries: det A = a11 a22 · · · ann .
6) If in a matrix, any row or column has all elements equal to zero, then
the determinant of that matrix is 0.
Dr. Bui Xuan Dieu Linear Algebra 10 / 30
Determinant

Determinant
Properties
7) Adding a scalar multiple of one column to another column does not
change the value of the determinant.
8) If two columns or rows of a matrix are identical, then its determinant
is 0.
9) Interchanging any pair of columns or rows of a matrix multiplies its
determinant by −1.
10) The determinant is an n-linear function
λα1 + µβ1 a12 . . . a1n

.. .. .. =



. . . . . .
λα + µβ a
n2 . . . ann

n n
α1 a12 . . . a1n β1 a12 . . . a1n

λ ... .. .. + µ .. .. .. ⇒ det(cA) = c n det A




. ... .
.
. . . . .
α a
n2 . . . ann βn an2 . . . ann

n

Dr. Bui Xuan Dieu Linear Algebra 11 / 30


Determinant

Determinant

The elementary row operation


Row-reduce the matrix to ”upper triangular” form:
i) Multiplying a row of matrix by a number c multiplies its determinant
by the same number,
ii) Adding a multiple of one row of a matrix to another row does not
change the determinant,
iii) Interchanging two rows of a matrix changes the sign of the
determinant.

Example
 
1 0 2 −1
3 0 0 5
Find the determinant of the matrix A =  .
 
2 1 4 −3
1 0 5 0

Dr. Bui Xuan Dieu Linear Algebra 12 / 30


Determinant

Determinants of some matrices of special form

Vandermonde Matrix
The Vandermonde matrix of order n:
 
1 1 ... 1 1

 a1 a2 . . . an−1 an 

a12 a22 2
. . . an−1 an2
 
Vn (a1 , a2 , ..., an ) =  
 .. .. .. .. .. 
. . . . .
 
 
a1n−1 a2n−1 n−1 n−1
. . . an−1 an

Lemma
Y
det Vn (a1 , a2 , ..., an ) = (aj − ai ).
16i<j6n

Dr. Bui Xuan Dieu Linear Algebra 13 / 30


Determinant

Determinants of some matrices of special form

The Cauchy matrix


1
The Cauchy matrix of order n, A = (aij ), where aij = xi +yj .

Lemma
Q
(xi − xj )(yi − yj )
i>j
det A = Q
(xi + xj )
i,j

Dr. Bui Xuan Dieu Linear Algebra 14 / 30


Determinant

Determinants of some matrices of special form

The Frobenius matrix


0 1 0 ... 0 0
 
0 0 1 ... 0 0 
 
. .. .. .. .. .. 
 .. . . . . . 
A=
 
0 0 0 ... 1 0 

 
0 0 0 ... 0 1 
a0 a1 a2 . . . an−2 an−1
or the friend matrix of the polynomial

p(λ) = λn − an−1 λn−1 − an−2 λn−2 − . . . − a0 .

Lemma
det(λI − A) = p(λ)

Dr. Bui Xuan Dieu Linear Algebra 15 / 30


Determinant

Determinants of some matrices of special form

The tridiagonal matrix


a1 b1 0 0 0 0
 
...
c
 1 a2 b2 . . . 0 0 0 

 .. 
0 c
 2 a3 . 0 0 0 
. .. .. .. .. .. .. 
. . . .
. . . . 


.. 
0 0

0 . an−2 bn−2 0 

 
0 0 0 . . . cn−2 an−1 bn−1 
0 0 0 ... 0 cn−1 an

Lemma
∆k = ak ∆k−1 − bk−1 ck ∆k−2 , k ≥ 2, where ∆k = det(aij )ki,j=1 .

Dr. Bui Xuan Dieu Linear Algebra 16 / 30


Determinant

The tridiagonal matrix

Denote by

a1 1 0 ... 0 0 0

−1 a 1 . . . 0 0 0
2


..
0 −1
a3 . 0 0 0
. . . . . .. ..
(a1 . . . an ) = ..
.. .. .. .. . .

..
0

0 0 . an−2 1 0


0 0 0 . . . −1 an−1 1

0 0 0 ... 0 −1 a
n

then
(a1 a2 . . . an ) 1
= a1 + 1
(a2 a3 . . . an ) a2 +
..
a3 + .+ 1
an−1 + a1
n

Dr. Bui Xuan Dieu Linear Algebra 17 / 30


Determinant

Determinants of some matrices of special form

Block matrix
!
A11 A12
A= , where A11 and A22 are m-square and n-square
A21 A22
matrices, respectively.

Theorem

DA DA12 A11 A12
11
= |D|.|A| and = |A|.

A21 A22 A21 + BA11 A22 + BA12

Dr. Bui Xuan Dieu Linear Algebra 18 / 30


Rank of a matrix, Invertible matrix

Chapter 2: Matrices - Determinants - System of Linear


Equations

1 Matrices

2 Determinant

3 Rank of a matrix, Invertible matrix

4 System of linear equations

Dr. Bui Xuan Dieu Linear Algebra 19 / 30


Rank of a matrix, Invertible matrix

Rank of a matrix

Definition
Let A be an m × n matrix and p an integer with 0 < p ≤ min{m, n}. A
p × p minor of A is the determinant of a p × p matrix obtained from A by
deleting m − p rows and n − p columns.

ai1 k1 ai1 k2 . . . ai1 kp



!
i1 . . . ip
= ... .. ..

A

k1 . . . kp . ... .
a aip k2 . . . aip kp
ip k1

Definition
The rank of a matrix is the order of the largest non-zero minor, denoted by
r (A) or ρ(A).

Dr. Bui Xuan Dieu Linear Algebra 20 / 30


Rank of a matrix, Invertible matrix

Rank of a matrix

Row echelon form


A matrix is in row echelon form if
1) all nonzero rows (rows with at least one nonzero element) are above
any rows of all zeroes,
2) the leading coefficient (the first nonzero number from the left, also
called the pivot) of a nonzero row is always strictly to the right of the
leading coefficient of the row above it.

Theorem
Rank of a row echelon form is the number of nonzero rows.

Dr. Bui Xuan Dieu Linear Algebra 21 / 30


Rank of a matrix, Invertible matrix

Rank of a matrix

Transformation to row echelon form


By means of a finite sequence of elementary row operations, also called
Gaussian elimination, any matrix can be transformed to row echelon form.
1) Change the positions of two rows.
2) Multiply a row by a nonzero scalar.
3) Add to one row a scalar multiple of another.

Example
 
1 3 5 −1
 2 −1 −1 4 
A=
 
5 1 −1 7 


7 7 9 1

Dr. Bui Xuan Dieu Linear Algebra 22 / 30


Rank of a matrix, Invertible matrix

Rank of a matrix

Transformation to row echelon form


By means of a finite sequence of elementary row operations, also called
Gaussian elimination, any matrix can be transformed to row echelon form.
1) Change the positions of two rows.
2) Multiply a row by a nonzero scalar.
3) Add to one row a scalar multiple of another.

Example
   
1 3 5 −1 1 3 5 −1
 2 −1 −1 4   0 −7 −11 6 
A=  → ... →   ⇒ r (A) = 4.
   
 5 1 −1 7   0 0 −4 0 
7 7 9 1 0 0 0 −4

Dr. Bui Xuan Dieu Linear Algebra 22 / 30


Rank of a matrix, Invertible matrix

Inverse of a matrix
Definition
Let A be an n-by-n square matrix. If there exists an n-by-n square matrix
B such that
AB = BA = In ,
then the matrix B is called the inverse of A, denoted by A−1 .

The uniqueness of A−1


The inverse of a matrix A, if exists, is unique.

The existence of A−1


If det A 6= 0, then
1
A−1 = .C T ,
det A
where C = [cij ]n×n and cij = (−1)i+j det Mij .
Dr. Bui Xuan Dieu Linear Algebra 23 / 30
Rank of a matrix, Invertible matrix

Inverse of a matrix

Properties
1) (A−1 )−1 = A.
2) (kA)−1 = k1 A−1 .
3) (AB)−1 = B −1 A−1 .
4) (AT )−1 = (A−1 )T .

Gauss-Jordan elimination
1) Adjoin the identity matrix to the right side of A,
2) Apply row operations to this matrix until the left side is reduced to I.
3) When A is reduced to I, then I becomes A−1 .

Dr. Bui Xuan Dieu Linear Algebra 24 / 30


Rank of a matrix, Invertible matrix

Examples

Example
Find the inverse of the matrices
   
3 −4 5 1 −a 0 0
a) B =  2 −3 1 
   0 1 −a 0 
b) C = 
 
3 −5 1 0 0 1 −a

 
0 0 0 1

Example
Prove that if A is a skew-symmetric (or antisymmetric or antimetric)
matrix of order n, where n is odd, then det(A) = 0.

Example
Let A = [aij ]n×n be a complex matrix such that aij = −aji . Prove that
det(A) is a real number.
Dr. Bui Xuan Dieu Linear Algebra 25 / 30
System of linear equations

Chapter 2: Matrices - Determinants - System of Linear


Equations

1 Matrices

2 Determinant

3 Rank of a matrix, Invertible matrix

4 System of linear equations

Dr. Bui Xuan Dieu Linear Algebra 26 / 30


System of linear equations

System of linear equations


Definition
A general system of m linear equations with n unknowns can be written as


 a11 x1 + a12 x2 + · · · + a1n xn = b1

 a x + a x + ··· + a x = b

21 1 22 2 2n n 2
(1)


 ························

am1 x1 + am2 x2 + · · · + amn xn = bm

where x1 , x2 , . . . , xn are the unknowns, a11 , a12 , . . . , amn are the


coefficients of the system, and b1 , b2 , . . . , bm are the constant terms.

The matrix equation

Ax = b,
where A = [aij ]m×n , x = [x1 , x2 , . . . , xn ]T and b = [b1 , b2 , . . . , bm ]T .
Dr. Bui Xuan Dieu Linear Algebra 27 / 30
System of linear equations

Cramer’s rule

Consider a system of n linear equations for n unknowns, represented in


matrix multiplication form as follows:

Ax = b, (2)

where the n × n matrix A has a nonzero determinant.


Theorem (Cramer’rule)
The system (2) has a unique solution, whose individual values for the
unknowns are given by:
det Aj
xj = ,
det A
where Aj is the matrix formed by replacing the j-th column of A by the
column vector b.

Dr. Bui Xuan Dieu Linear Algebra 28 / 30


System of linear equations

Kronecker-Capelli Theorem


 a11 x1 + a12 x2 + · · · + a1n xn = b1

 a x + a x + ··· + a x = b

21 1 22 2 2n n 2
(3)


 · · · · · · · · · · · · · · · · · · · · · · · ·

am1 x1 + am2 x2 + · · · + amn xn = bm

Kronecker-Capelli Theorem
 
The system (3) has solution if and only if r A = r (A), where A = [A|b].

Corollary
 
1) If r A 6= r (A), then the system (3) has no solution.
 
2) If r A = r (A) = n, then the system (3) has a unique solution.
 
3) If r A = r (A) < n, then the system (3) has infinitely many
solutions.
Dr. Bui Xuan Dieu Linear Algebra 29 / 30
System of linear equations

Gaussian elimination

Consider the augmented matrix A. This matrix is then modified using


elementary row operations until it reaches reduced row echelon form.
S1. Swap the positions of two rows.
S2. Multiply a row by a nonzero scalar.
S3. Add to one row a scalar multiple of another.

Example
 
x1 − 2x2 + x3

 =4  ax1 + x2 + x3 + x4 = 1

a) 2x + x − x =0 c) x + ax + x + x = a
1 2 3 4
1 2 3  x + x + ax + x = a2

1 2 3 4

−x + x + x

= −1
1 2 3

3x1 − 5x2 − 7x3 =1 
 (2 − a)x1 + x2 + x3 = 0

 
b) x + 2x + 3x
1 2 3 =2 d) x + (2 − a)x + x = 0
1 2 3

−2x + x + 5x

= 2.  x + x + (2 − a)x = 0

1 2 3 1 2 3

Dr. Bui Xuan Dieu Linear Algebra 30 / 30

You might also like