Lecture Notes Algebra-Chapter 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

,

LECTURE NOTES ON ALGEBRA


(MI1141E)

TUAN ANH DAO

SCHOOL OF APPLIED MATHEMATICS AND INFORMATICS

HANOI UNIVERSITY OF SCIENCE AND TECHNOLOGY

Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST


,

Chapter 2: Matrices, Determinants, System of linear


equations

1 MATRICES

2 DETERMINANT OF SQUARE MATRICES

3 RANK OF MATRICES AND INVERSE MATRIX

4 SYSTEM OF LINEAR EQUATIONS

Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST


,

Chapter 2: Matrices, Determinants, System of linear


equations

Lesson 1: MATRICES

Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST


,

Lesson 1: Matrices
I. Basic concepts
1. Definition: A matrix A = [aij ]m×n is an m × n array of real (or
complex) numbers as follows:
   
a11 a12 . . . a1n a11 a12 . . . a1n
 a21 a22 . . . a2n   a21 a22 . . . a2n 
A= . . . or A =  . .. ..  ,
   
 .. .. . .. .. 

 .. ..
. . . 
am1 am2 . . . amn am1 am2 . . . amn

where
• aij = entries (or elements) of A with i = 1, m and j = 1, n.
• m = number of rows, n = number of columns.
• m × n = size of A.   
1 −2 1 2 3
Examples: A = and B =
3 4 −4 5 1
2. Remark: The set of m × n matrices with the entries in the field K
(K = R, C) is denoted by Matm×n (K ) or Mm×n (K ) for simplicity.
Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST
,

Lesson 1: Matrices
3. Classification of matrices:
• Zero matrix: (or Null matrix) is a matrix of size m × n in which all its
entries are zero, denoted by 0m×n .    
  0 0 0 0 0
For examples: 01×1 = 0 , 02×2 = , 02×3 =
0 0 0 0 0
• Square matrix: (or n-square matrix) is a matrix with the same
number of rows and columns (m = n). Then,
i) a11 , a22 , · · · , ann are called diagonal entries of A.
ii) The line linking from a11 to ann is called the main diagonal of A.
• Diagonal matrix: is a n-square matrix with aij = 0, ∀i ̸= j, namely
 
a11 0 . . . 0
 0 a22 . . . 0 
A= . .. .. 
 
 .. ..
. . . 
0 0 ... ann
• Identity matrix: is a diagonal matrix in which all elements on the
main diagonal are equal to 1 (aii = 1). We denote In
Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST
,

Lesson 1: Matrices
• Triangular matrix: is a n-square matrix in which all elements of A
below (above) the main diagonal are zero, in particular,
   
a11 a12 . . . a1n a11 0 ... 0
 0 a22 . . . a2n   a21 a22 . . . 0 
A= . . . or A =  . .. ..  .
   
 .. .. . .. .. 

 .. ..
. . . 
0 0 . . . ann am1 am2 . . . ann
Then, A is called an upper (lower) triangular matrix, respectively.
• Row (Column) matrix: is a matrix with a single row, i.e. n = 1 (or
a single column, i.e. m = 1).
 
a11
   a21 
A = a11 a12 . . . a1n or A =  .  .
 
 .. 
am1
4. Equality of Matrices: We say that [aij ]m×n = [bij ]m×n if they have
the same size and aij = bij , ∀i, j.
Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST
,

Lesson 1: Matrices
II. Matrix operations
1. Addition/Subtraction: Let A = [aij ]m×n , B = [bij ]m×n be two
matrices having the same size. Then,

A ± B = [aij ± bij ]m×n .

2. Scalar multiplication: Let A = [aij ]m×n be a matrix and k be a


constant. Then,
kA = [k.aij ]m×n .
Some properties: Let A, B and C be three matrices of the same
size, and k, ℓ be constants.
• A + B = B + A.
• (A + B) + C = A + (B + C ) = (A + C ) + B.
• A + 0 = A.
• k(A + B) = kA + kB.
• (k + ℓ)A = kA + ℓA.
• k(ℓA) = (kℓ)A.
Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST
,

Lesson 1: Matrices
3. Matrix multiplication: Let A = [aij ]m×p and B = [bij ]p×n be two
matrices. Then, the product of A and B, denoted by AB, is defined by

C = [cjk ]m×n , where cjk = aj1 b1k + aj2 b2k + . . . + ajp bpk
= Multiplying j th row of A with k th column of B.

Namely,

Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST


,

Lesson 1: Matrices
Remarks:
• The condition to ensure that A.B is well-defined is the column
number of A = the row number of B.
• A.B is well-defined, however, B.A may be not well-defined.
Moreover, if A.B and B.A are both well-defined, then A.B ̸= B.A in
general.
• A(BC ) = (AB)C , A(B + C ) = AB + AC , (B + C )A = BA + CA,
k(AB) = (kA)B = A(kB) for any k ∈ R, Im A = A = AIn ,
in which all calculations are well-defined.
• If A ∈ Matn×n , then Ak = A . . . A for any k ≥ 1 and A0 = In .
4. Transposition of matrices: Transposition of A = [aij ]m×n , denoted by
AT , is defined by
AT = [aji ]n×m , i.e. k th row of AT = k th column of A.
Remarks: If the followings are well-defined, then they hold

• (AT )T = A • (kA)T = kAT for any k ∈ R


• (A ± B)T = AT ± B T • (AB)T = B T AT
Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST
,

Chapter 2: Matrices, Determinants, System of linear


equations

Lesson 3:
DETERMINANTS OF SQUARE MATRICES

Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST


,

Lesson 2: Determinant of square matrices


I. How to compute determinants
1. Formula: Let A = [aij ]n×n be a n-square matrix. The determinant of
A, denoted by |A| or detA, is defined by the following formula:
• n = 1: A = 
[a11 ] ⇒ detA
 = a11 .
a11 a12
• n = 2: A = ⇒ detA = a11 a22 − a12 a21 .
a a22
 21 
a11 . . . a1j . . . a1n
 .. .. .. 
 . . . 
 
• n ≥ 3: A =  ai1 . . . aij . . . ain 

 ⇒ There are two ways!
 .. .. .. 
 . . . 
an1 . . . anj . . . ann
detA = (−1)i+1 ai1 detMi1 + (−1)i+2 ai2 detMi2 + · · · + (−1)i+n ain detMin
(Expansion of the i th row)
= (−1)1+j a1j detM1j + (−1)2+j a2j detM2j + · · · + (−1)n+j anj detMnj
(Expansion of the j th column)
Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST
,

Lesson 2: Determinant of square matrices


where Mij is formulated from A by removing the i th row and the j th
column ⇒ Mij is (n − 1)-square matrices for any i, j = 1, n.
1 4 −3
1 −2
Examples: Calculate and 5 2 1
3 5
−3 6 0
2. Remark: The determinant of a triangular matrix equals to the product
of all entries on the main diagonal, namely,
   
a11 a12 . . . a1n a11 0 . . . 0
 0 a22 . . . a2n  a21 a22 . . . 0 
A= . . . or A =  . .. .. 
   
. . . . .  . . .
 . . . .   . . . . 
0 0 . . . ann an1 an2 . . . ann
⇒ detA= a11 .a22 . · · · ann
1 −2 3 4
0 −1 1 5
Examples: Compute
0 0 4 1
0 0 0 5
Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST
,

Lesson 2: Determinant of square matrices


II. Properties of determinants
a11 a12 a13 a11 a21 a31
1. detAT = detA, for example a21 a22 a23 = a12 a22 a32
a31 a32 a33 a13 a23 a33
2. If two rows (columns) of A are interchanged to produce B, then
detB = - detA, for example
a11 a12 a13 a31 a32 a33
a21 a22 a23 = − a21 a22 a23 (R1 ←→ R3 )
a31 a32 a33 a11 a12 a13
Remark: If two rows (columns) of A are equal, then detA = 0.
3. If elements of a row (column) in a determinant can be expressed as
the sum of two or more elements, then the given determinant can be
expressed as the sum of two or more determinants, for example
··· ··· ··· ··· ··· ··· ··· ··· ···
a1 + b1 ··· an + bn = a1 ··· an + b1 ··· bn
··· ··· ··· ··· ··· ··· ··· ··· ···
Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST
,

Lesson 2: Determinant of square matrices


4. If one row (column) of A is multiplied by a constant k to produce B,
then detB = k.detA, for example
··· ··· ··· ··· ··· ··· ··· ···
ka1 ka2 ··· kan = k a1 a2 ··· an
··· ··· ··· ··· ··· ··· ··· ···
Corollaries:
• det(k.A) = k n .detA.
• If all elements of any row (column) in A are equal to zero, then
its determinant is zero.
• If any two rows (columns) in A are proportional, then its
determinant is zero.
5. If one row (column) of A is added by another row (column) which is
multiplied by a constant k to produce B, then detB = detA, like
a1 a2 ··· an a1 a2 ··· an
··· ··· ··· ··· = ··· ··· ··· ···
b1 + ka1 b2 + ka2 ··· bn + kan b1 b2 ··· bn
Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST
,

Lesson 2: Determinant of square matrices

III. Compute determinants by using elementary operations


1 2 −1 3
1 2 −1
2 3 1 5
Examples: Calculate 2 3 1 =? and =?
−1 6 5 −2
−1 6 5
3 4 −2 7
1. Elementary operations:
• Interchange two rows (columns) ⇒ detB = - detA.
• Multiply one row (column) with a constant k ⇒ detB= k.detA.
• Multiply one row (column) with a constant k, then add it to
another row (column) ⇒ detB = detA.
2. How to apply elementary operations to compute determinants:
Elementary operations
▶ Step 1: A −−−−−−−−−−−−→ Triangular matrix A.
▶ Step 2: detA = The product of all entries on the main diagonal
⇒ detA =?

Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST


,

Chapter 2: Matrices, Determinants, System of linear


equations

Lesson 3:
RANK OF MATRICES AND INVERSE MATRIX

Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST


,

Lesson 3: Rank of matrices and Inverse matrix


I. Rank of matrices
1. Submatrix: Let A be a matrix of size m × n and k ≤ min{m, n}. A
submatrix of size k of matrix A is a square matrix of size k which is
obtained from A by removing m − k rows and n − k columns.
Examples: Find submatrices of size 2 of
 
1 2 3 4
A = 2 4 6 8
3 5 7 9
2. Definition: The rank of matrix A, denoted by r(A) or rank(A), is
the largest size of a submatrix with non-zero determinant.
Examples: Find rank of A above?
3. Echelon matrix: A matrix is of echelon form if it satisfies the
following conditions:
• All the zero rows, if any, are on the bottom of the matrix.
• In the nonzero row, each leading nonzero entry is to the right of
the leading nonzero entry in the preceding row.
Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST
,

Lesson 3: Rank of matrices and Inverse matrix


 
−2 2 0 3 4
 0 0 1 1 −1
Examples: A =   0 0 0 5 17 

0 0 0 0 0
Pay attention: An echelon matrix has size of m × n, in general, but a
triangular matrix has size n × n.
4. Key property: If A is an echelon matrix, then rank(A) = number of
rows not equal to zero of A.
5. How to apply elementary operations to find rank:
Elementary operations
▶ Step 1: A −−−−−−−−−−−−→ Echelon matrix A.
▶ Step 2: rankA = Number of rows not equal to zero of A ⇒ rankA =?
Examples: Find rank of
 
1 1 2 0  
 2 1 −1 3  1 2 −2
 (m ∈ R)
A= −4 5 2 −1 and B = 2 m 1
 
−1 4 5
−1 7 3 2

Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST


,

Lesson 3: Rank of matrices and Inverse matrix


6. Remarks:
• If A = [0]m×n , then rank(A)= 0.
• If A is a n-square matrix, then detA ̸= 0 ⇔ rank(A) = n, and
detA = 0 ⇔ rank(A) ≤ n − 1.
• For any matrix A, it holds that rank(A) = rank(AT )
II. Inverse matrix
1. Definition: Let A be a n-square matrix. We say that A is invertible
if there exists a matrix B fulfilling
A.B = B.A = In .
Then, B is called the inverse matrix of A. We denote B = A−1 .
Examples: a) The inverse matrix of In is In .
b) The zero matrix is not invertible.
2. Properties of inverse matrix:

• (A.B)−1 = B −1 .A−1 . • (A−1 )−1 = A


1
• (kA)−1 = A−1 , k ̸= 0. • (A−1 )n ̸= A−n , n ∈ N
k
Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST
,

Lesson 3: Rank of matrices and Inverse matrix


3. How to compute inverse matrix: There are two main ways!
• 1st way: Using determinants.
If detA ̸= 0, then there exists A−1 and A−1 is defined by
1
A−1 = .ÃT ,
detA
where
à = [ãij ]n×n with ãij = (−1)i+j detMij ,
Mij is formulated from A by removing the i th row and the j th column.
 
  1 2 3 0
−1 2 1 0 1 4 0
Examples: A =  0 1 0 and B =  1 2 2 0

3 2 1
0 0 0 1
• 2nd way: Using elementary operations (Gauss-Jordan method).
Elementary operations
▶ Step 1: [A|I] −−−−−−−−−−−−→ [I|A∗ ].
▶ Step 2: A−1 = A∗
Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST
,

Chapter 2: Matrices, Determinants, System of linear


equations

Lesson 4: SYSTEM OF LINEAR EQUATIONS

Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST


,

Lesson 4: System of linear equations


I. Basic concepts
1. Definition: A general system of m linear equations with n unknown
variables can be written as follows:


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

a x + a x + . . . a x = b
21 1 22 2 2n n 2
(1) − General form


 . . . . . . . . . . . . . . . . . . . . . . . . . . .
am1 x1 + am2 x2 + . . . amn xn = bm

where • aij with i = 1, m, j = 1, n are called coefficients.


• x1 , x2 , . . . , xn are unknown variables,
• b1 , b2 , . . . , bm are the right-hand side constants.
     
a11 a12 . . . a1n x1 b1
 a21 a22 . . . a2n  x2   b2 
(1) ⇔  . .. ..  .  ..  =  ..  ⇔ Am×n .Xn×1 = Bm×1 (2)
     
 .. ..
. . .  .  . 
am1 am2 . . . amn xn bm
Then, (2) is called the matrix form of (1).
Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST
,

Lesson 4: System of linear equations



2x1 + 7x2 + x3 = 9
     
 2 7 1 x1 9
Examples: 3x1 − x2 + 4x3 = 0 ⇔ 3 −1 4 . x2  = 0
5 9 2 x3 5

5x1 + 9x2 + 2x3 = 5

2. Remarks:
• If b1 = b2 = · · · = bn = 0, then (1) is called a homogeneous sytem.
• If there exists bi ̸= 0, then (1) is called a non-homogeneous sytem.
II. Cramer’s rule
(
m=n
1. Definition: System (1) is called Cramer’s system if
detA ̸= 0
2. Theorem: Cramer’s system has a unique solution (x1 , x2 , · · · , xn )
given by
detAi
xi = for any i = 1, n,
detA
where Ai is formulated from A by replacing the i th column of A by
the right-hand side matrix B.
Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST
,

Lesson 4: System of linear equations


Examples: Solve the following system of linear equations:

 2x1 + x2 − x3 − x4 + x5 = 1
x1 + x2 − 2x3 = 6


 
x − x + x + x − 2x = 0
1 2 3 4 5
2x1 + 3x2 − 7x3 = 16 and
 3x
 1
 + 3x 3 − 3x 3 − 3x 4 + 4x5 = 2
5x1 + 2x2 + x3 = 16
 
4x1 + 5x2 − 5x3 − 5x4 + 7x5 = 3

III. Gauss elimination method


1. Definition: Let Am×n .Xn×1 = Bm×1 be a matrix form of system of
linear equations. The augmented matrix of this system, denoted by
A, is obtained by adding matrix B to the right side of A: A = [A|B]
2. Some steps of Gauss elimination method:

• Interchange two equations ⇔ Interchange two rows


• Multiply one equation with
⇔ Multiply one row with k ̸= 0
k ̸= 0
• Multiply one equation with k ⇔ Multiply one row with k and
and add it to another equation add it to another row
Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST
,

Lesson 4: System of linear equations

3. How to apply Gauss elimination method to solve the system

Am×n .Xn×1 = Bm×1 (1)


Elementary operations
• Step 1: A = [A|B] −−−−−−−−−−−−→ Echelon matrix A∗ ⇒ rank(A∗ ).
Then, calculate rank(A)=? and rank(A)=?.
• Step 2: Let us use Kronecker-Capelli’s theorem to divide our
consideration into the following cases:
▶ If rank(A) ̸= rank(A), then the system (1) has no solution.
▶ If rank(A) = rank(A) = n (number of unknown variables), then
the system (1) has a unique solution.
▶ If rank(A) = rank(A) < n (number of unknown variables), then
the system (1) has infinitely many solutions.
Remark: Finally, in the last two cases we may turn to the matrix A∗ to
find solution of (1).

Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST


,

The end

Thank you for your attention!

Tuan Anh Dao, SAMI-HUST ALGEBRA I ♡ HUST

You might also like