Chapter 2
Chapter 2
October 2024
1 / 99
Contents
Contents
1 2.1. Matrices
2.1.1. Definitions
2.1.2. Operations with matrices
2 2.2. Determinants
2.2.1. Definition
2.2.2. Some properties of determinants
2.2.3. Evaluation of a determinant using elementary row operations
3 2.3. Rank of a matrix
2.3.1. Rank of a matrix
2.3.2. Evaluation of the rank of a matrix
2.3.3. Inverse of a matrix
2.3.4. Finding the inverse of a matrix
4 2.4. Systems of linear equations
2.4.1. Definition
2.4.2. Cramer’s system
2.4.3. General system of linear equations
2.4.4. Homogeneous systems
2 / 99
2.1. Matrices 2.1.1. Definitions
2.1.1. Definitions
Let K be the field of real numbers or the field of complex numbers.
A matrix (over K ) of size m × n is a rectangular array of numbers (in K ), which has m row and n
column:
a11 a12 . . . a1n
a21 a22 . . . a2n
A= . .. ..
.. ..
. . .
am1 am2 ... amn
vhere aij ∈ K (for i = 1, . . . , m, j = 1, . . . , n).
If m = n then A is called a square matrix (of ordern). The entries a11 , a22 , . . . , ann đare call
diagonal entries. Diagonal entries form the main diagonal of A.
Matrices are usually written in square brackets as above, or parentheses, and may be abberivated
by writing only single generic term, such as A = [aij ]m×n or A = (aij )m×n .
The set of matrices of size m × n with entries in K is denoted by Mm×n (K ), or Mm,n (K ), or
M(m × n, K ). In the case m = n, we also use the notation Mn (K ) to denote the set of square
matrices of order n (with entries in K ).
3 / 99
2.1. Matrices 2.1.1. Definitions
4 / 99
2.1. Matrices 2.1.1. Definitions
A square matrix A = [aij ]n×n is called an upper triangular matrix if aij = 0, for all i > j.
a11 a12 . . . a1n
0 a22 . . . a2n
A= . .. ..
.. ..
. . .
0 0 ... ann
A square matrix A = [aij ]n×n is called a lower triangular matrix if aij = 0, for all i < j.
a11 0 . . . 0
a21 a22 . . . 0
A= . .. ..
.. ..
. . .
an1 an2 . . . ann
5 / 99
2.1. Matrices 2.1.1. Definitions
A square matrix A = [aij ]n×n is called a diagonal matrix if aij = 0, for all i ̸= j.
a11 0 . . . 0
0 a22 . . . 0
A= . .. ..
.. ..
. . .
0 0 ... ann
A square matrix A = [aij ]n×n is called the ịdentity matrix (of order n) if it is a diagonal matrix and
aii = 1, for all i. The identity matrix of order n is usually denoted by In (or I ), or En (or E ).
1 0 ... 0
0 1 . . . 0
In = . . . ..
.. .. .. .
0 0 ... 1
6 / 99
2.1. Matrices 2.1.1. Definitions
Equality of matrices
Defintion
Two matrices A = [aij ]m×n and B = [bij ]p×q are equal, written A = B if
they have the same size:: m = p and n = q;
aij = bij for all i = 1, . . . , m, j = 1, . . . , n.
7 / 99
2.1. Matrices 2.1.2. Operations with matrices
For a matrix A = [aij ]m×n , the negative of A, writtend as −A, is defined by −A = [−aij ]m×n .
We also define A − B = A + (−B).
Properties
On the set ofm × n (over K ), we have
(A + B) + C = A + (B + C ),
A + O = O + A = A,
A + (−A) = (−A) + A = O,
A + B = B + A.
In other words, the set Mm×n (K ) together with matrix addition is an abelian group.
9 / 99
2.1. Matrices 2.1.2. Operations with matrices
Scalar multiplication
Definition
The product of a number (scalar) k and an m × n matrix A = [aij ]m×n is the matrix kA of size m × n,
which is given by
kA = [kaij ]m×n .
10 / 99
2.1. Matrices 2.1.2. Operations with matrices
Properties
Properties
Let A, B be matrices in Mm×n (K ) and c, d ∈ K . We have
(cd)A = c(dA),
1A = A,
c(A + B) = cA + cB,
(c + d)A = cA + dA.
Extra property: If A lis a matrix of size m × n and O is the zero matrix of size m × n then
ñ
c =0
cA = O ⇔ .
A=O
11 / 99
2.1. Matrices 2.1.2. Operations with matrices
Matrix multplication
Definition
Let A = [aij ]m×n be a matrix of sizem × n and B = [bij ]n×p a matrix of size n × p. The product AB is
the matrix C = [cij ]m×p of size m × p given by
n
X
cij = ai1 b1j + ai2 b2j + · · · + ain bnj = aik bkj (∀i = 1, . . . , m, j = 1, . . . , p).
k=1
12 / 99
2.1. Matrices 2.1.2. Operations with matrices
Remarks
The product AB is defined only in the case that the number of columns of A is equal to the
number of rows of B.
To obtain the entry cij of the product AB we multiply the entries in the ith row of A by the
corresponding entries in the jth column of B and then add the results.
1 b1j
: b
2j
.
ai1 ai2 . . . ain . =⇒ cij = ai1 b1j + ai2 b2j + · · · + ain bnj
XX .
the ith row of A X
z
X
bnj
the jth column of B
he product AB could be defined meanwhile the product BA is not defined. Even in the case that
both AB and BA are defined, in general we still have AB ̸= BA.
13 / 99
2.1. Matrices 2.1.2. Operations with matrices
Remarks
Example:
ï ò ï ò
1 1 1 −2
A= ,B= : A ̸= O, B ̸= O but AB = O.
2 2 −1 2
ï ò ï ò ï ò
1 0 0 −1 1 −2
A= ,B= ,C= :
2 0 0 −2 −1 2
ï ò
1 −2
AC = BC = but A ̸= B.
2 −4
14 / 99
2.1. Matrices 2.1.2. Operations with matrices
Example
1 2
−1
ï ò
1 2
Let A = , B = 2 −1. Compute AB.
0 1 −2
3 1
ï ò
c c12
C = AB is of size 2 × 2, C = 11 .
c21 c22
c11 = 1 · 1 + (−1) · 2 + 2 · 3 = 5.
c12 = 1 · 2 + (−1) · (−1) + 2 · 1 = 5.
c21 = 0 · 1 + 1 · 2 + (−2) · 3 = −4.
c22 = 0 · 2 + 1 · (−1) + (−2) · 1 = −3.
ï ò
5 5
AB = C = .
−4 −3
15 / 99
2.1. Matrices 2.1.2. Operations with matrices
Properties
Let A, B, C be matrices (with sizes such the given operations are defined) and c ∈ K . Then we have
following properties.
(AB)C = A(BC )
A(B + C ) = AB + AC , (B + C )A = BA + CA
(cA)B = A(cB) = c(AB)
If A is of size m × n then AIn = A and Im A = A.
Remark: The set Mn (K ) of square matrices of order n together with matrix addition and multiplication
is a ring (with unit).
16 / 99
2.1. Matrices 2.1.2. Operations with matrices
Powers of a matrix
Ak = A
| · A{z· · · A} .
k lần
f (A) = ak Ak + · · · + a1 A + a0 In .
17 / 99
2.1. Matrices 2.1.2. Operations with matrices
Example (GK20161)
−1 −1 0
Let A = 0 −1 2 and P(x) = x 2 + 2x + 1. Compute P(A).
1 −1 −1
Solution 1:
−1 −1 0 −1 −1 0 1 2 −2
A2 = 0 −1 2 0 −1 2 = 2 −1 −4.
1 −1 −1 1 −1 −1 −2 1 −1
1 2 −2 −1 −1 0 1 0 0 0 0 −2
P(A) = A2 + 2A + I3 = 2 −1 −4 + 2 0 −1 2 + 0 1 0 = 2 −2 0 .
0 1 −1 1 −1 −1 0 0 1 2 −1 −2
0 −1 0 0 −1 0 0 0 −2
Solution 2: P(A) = A2 + 2A + I3 = (A + I3 )2 = 0 0 20 0 2 = 2 −2 0 .
1 −1 0 1 −1 0 2 −1 −2
18 / 99
2.1. Matrices 2.1.2. Operations with matrices
Example (GK20161)
i −1
ï ò
Cho A = . Compute A3 and A27 .
1 i
−1 i −1 −2 −2i −1
ï òï ò ï ò ï ò
2 i i
A = = = 2i = (2i)A.
1 i 1 i 2i −2 1 i
−4i
ï ò
3 2 4
A = (2i)A · A = (2i)A = (2i) · (2i)A = −4A = .
−4 −4i
By induction on k: Ak = (2i)k−1 A, for every natural number k ≥ 1.
A27 = (2i)26 A = −226 A.
19 / 99
2.1. Matrices 2.1.2. Operations with matrices
Thus, the columns of AT are the rows of A, the rows of AT are the columns of A.
ï ò 1 4
1 2 3
Example: If A = then AT = 2 5.
4 5 6
3 6
20 / 99
2.1. Matrices 2.1.2. Operations with matrices
Definition
A matrix A is said to be symmetric if AT = A.
A matrix A is said to be skew-symmetric if AT = −A.
Thus
Matrix A = [aij ] is symmetric if and only if A is a square matrix and aij = aji , ∀i, j.
Matrix A = [aij ]is skew-symmetric if and only if A is a square matrix and aij = −aji , ∀i, j.
1 2 3 0 2 3
Example: Matrix 2 5 6 is symmetric, and −2 0 6 is skew-symmetric.
3 6 4 −3 −6 0
21 / 99
2.1. Matrices 2.1.2. Operations with matrices
Properties
22 / 99
2.2. Determinants 2.2.1. Definition
2.2.1. Definition
Let A = [aij ]n×n be a square matrix of order n. We shall define recursively the determinant of A,
denoted by det(A) or |A|.
23 / 99
2.2. Determinants 2.2.1. Definition
Definition
The determinant ofA = [aij ]n×n is
24 / 99
2.2. Determinants 2.2.1. Definition
Example
1 2 −1
Evaluate the determinant of A = 2 −1 2 .
3 1 2
ï ò
−1 2 −1 2
M11 = ⇒ C11 = + det(M11 ) = = −4.
1 2 1 2
ï ò
2 2 2 2
M12 = ⇒ C12 = − det(M12 ) = − = −(−2) = 2.
3 2 3 2
ï ò
2 −1 2 −1
M13 = ⇒ C13 = + det(M13 ) = = 5.
3 1 3 1
|A| = a11 C11 + a12 C12 + a13 C13 = 1 · (−4) + 2 · 2 + (−1) · 5 = −5.
In short, we have:
|A| = a11 det(M11 ) − a12 det(M12 ) + a13 det(M13 )
−1 2 2 2 2 −1
=1· −2· + (−1) ·
1 2 3 2 3 1
= 1 · (−4) + 2 · 2 + (−1) · 5 = −5.
25 / 99
2.2. Determinants 2.2.1. Definition
Remark: We usually use the Laplace expansion along a row or column which has many zeroes.
26 / 99
2.2. Determinants 2.2.1. Definition
Example
1 2 −1
Consider the matrix A = 2 −1 2 .
3 1 2
y the Laplace expansion along the 2nd row, we have
|A| = −a21 det(M21 ) + a22 det(M22 ) − a23 det(M23 )
2 −1 1 −1 1 2
= (−2) · + (−1) · −2·
1 2 3 2 3 1
= (−2) · 5 + (−1) · 5 − 2 · (−5) = −5.
y the Laplace expansion along the 3rd column, we have
|A| = a13 det(M13 ) − a23 det(M23 ) + a33 det(M33 )
2 −1 1 2 1 2
= (−1) · −2· +2·
3 1 3 1 2 −1
= (−1) · 5 − 2 · (−5) + 2 · (−5) = −5.
27 / 99
2.2. Determinants 2.2.1. Definition
he determinant of a
a11 a12 a13
A = a21 a22 a23 ?
a31 a32 a33
det(A) = a11 a22 a33 + a12 a23 a31 + a13 a21 a32
− a31 a22 a13 − a32 a23 a11 − a33 a21 a12 .
28 / 99
2.2. Determinants 2.2.1. Definition
Example
1 2 −1
Evaluate the determinant of A = 2 −1 2 .
3 1 2
1 2 −1 1 2
2 −1 2 2 −1
3 1 2 3 1
|A| = 1 · (−1) · 2 + 2 · 2 · 3 + (−1) · 2 · 1 − 3 · (−1) · (−1) − 1 · 2 · 1 − 2 · 2 · 2
= (−2) + 12 + (−2) − 3 − 2 − 8
= −5.
29 / 99
2.2. Determinants 2.2.1. Definition
Some exercises
1 1 1
(GK20161) Find x such that 2 x −3 = 0.
4 x2 9
3−x 2 2
(GK20171) b) Solve for 2 3−x 2 = 0.
2 2 3−x
2 −1 1
(GK20191) Let A = 1 0 3. Find λ ∈ R such that det(A − λE ) = 0, where E the identity
0 1 1
matrix of order 3.
1 1 1
(GK20201) Find a condition on a, b, c to ensure that a b c = 0.
a2 b2 c2
30 / 99
2.2. Determinants 2.2.1. Definition
We have
det(A) = a11 a22 . . . ann , det(B) = b11 b22 . . . bnn .
Particular case: This formular can be applied for diagonal matrices. In particular, det(In ) = 1.
31 / 99
2.2. Determinants 2.2.2. Some properties of determinants
Determinant of transpose
det(AT ) = det(A)
.
Remark: In the following, we only state properties of determinants in terms of "rows". But these
properties still holds true if we replace "rows" by "column".
32 / 99
2.2. Determinants 2.2.2. Some properties of determinants
Example:
1 2 3 4 5 6
4 5 6 =−1 2 3 (H2 ↔ H1 )
7 8 10 7 8 10
Corollary
If A has two equal rows then det(A) = 0.
33 / 99
2.2. Determinants 2.2.2. Some properties of determinants
Example:
2 4 6 1 2 3 (H1 ← 12 H1 )
4 5 6 =24 5 6
7 8 10 7 8 10
Corollary
If one row of A is a multiple of another row then det(A) = 0.
If A has a zero row then det(A) = 0.
If A is a square matrix of order n and k is a scalar then det(kA) = k n det(A).
34 / 99
2.2. Determinants 2.2.2. Some properties of determinants
Property
If a square matrix A = [aij ]n×n has some ith row such that aij = bj + cj (for all j = 1, . . . , n) then
det(A) the sum of two determinants
a11 a12 ··· a1n a11 a12 ··· a1n a11 a12 ··· a1n
.. .. .. .. .. .. .. .. ..
. . . . . . . . .
b1 + c1 b2 + c 2 ··· bn + cn = b1 b2 ··· bn + c1 c2 ··· cn
.. .. .. .. .. .. .. .. ..
. . . . . . . . .
an1 an2 ··· ann an1 an2 ··· ann an1 an2 ··· ann
Example:
1 2 3 1 2 3 1 2 3 1 2 3
4 5 6 = 1+3 (−1) + 6 2+4 = 1 −1 2 + 3 6 4
7 8 10 7 8 10 7 8 10 7 8 10
35 / 99
2.2. Determinants 2.2.2. Some properties of determinants
Corollary
If B is obtained from A by adding a multiple of a row A to another row of A then det(B) = det(A).
Example:
1 2 3 1 2 3
4 5 6 = 6 9 12 (H2 ← H2 + 2H1)
7 8 10 7 8 10
1 2 3 1 2 3
4 5 6 = 4 5 6
7 8 10 4 2 1 (H3 ← H3 − 3H1)
36 / 99
2.2. Determinants 2.2.2. Some properties of determinants
37 / 99
2.2. Determinants 2.2.2. Some properties of determinants
Example (GK20201-N3)
Show there is no real square matrix A of order 2019 such that A2020 + E = O, where E is the identity
matrix of order 2019.
Suppose there is a real matrix A of order 2019 such that A2020 + E = O. Then A2020 = −E .
Hence det(A2020 ) = det(A)2020 = det(−E ) = (−1)2019 det(E ) = −1.
This is impossible since. . . det(A) ∈ R and hence det(A)2020 ≥ 0.
38 / 99
2.2. Determinants 2.2.2. Some properties of determinants
Some exercises*
(GK20213) Let A, B be real square matrices of order 2023. Show that there is no real matrix X
such that (AX )T B 2022 XA + 3E = O.
(GK20191) Let A, B be two square matrices of the same orders such that A2019 = 0 and
AB = A + B. Show thadet(B) = 0. [Hint: det(A) = 0 and A(B − I ) = B, where I is the identity
matrix.]
(GK20181) Let A ̸= O and n ∈ N, n ≥ 2 such that An = O. Show that det(A − E ) ̸= 0, where E
the identity matrix. [Hint: (A − E )(An−1 + · · · + A + E ) = An − E .]
(GK20181) Let A be a square matrix and λ ∈ R such that det(A − λE ) = 0, where E is the
identity matrix. Show that
det(A2 + 2A − (λ2 + 2λ)E ) = 0.
(GK2017-N1) Let A, B be real square matrices of order n, n ≥ 2, such that AB = BA. Show that
det(A2 + B 2 ) ≥ 0. [Hint: since AB = BA, A2 + B 2 = (A + iB)(A − iB).]
(CK20161) Let A be a real square matrix of order 2017. Show that
39 / 99
2.2. Determinants 2.2.3. Evaluation of a determinant using elementary row operations
40 / 99
2.2. Determinants 2.2.3. Evaluation of a determinant using elementary row operations
41 / 99
2.2. Determinants 2.2.3. Evaluation of a determinant using elementary row operations
Example
1 2 −1
Evaluate 2 −1 2 .
3 1 2
We have
1 2 −1 1 2 −1
2 −1 2 = 0 −5 4 (H2 ← H2 − 2H1 )
3 1 2 3 1 2
1 2 −1
= 0 −5 4
0 −5 5 (H3 ← H3 − 3H1 )
1 2 −1
= 0 −5 4
0 0 1 (H3 ← H3 − H2 )
= −5.
42 / 99
2.3. Rank of a matrix 2.3.1. Rank of a matrix
Submatrices
Selecting p columns and and p rows of A, the entries that appear in both the rows and columnns of
those selected form a new square matrix of order p. Such a matrix is called a submatrix of order p. Its
determinant is called a minor (or minor determinant) of order p (in A).
ai1 j1 ai1 j2 . . . ai1 jp
ai2 j1 ai2 j2 . . . ai2 jp
j ,...,j
Notation Ai11,...,ipp = . .. .. .
.. ..
. . .
aip j1 aip j2 . . . aip jp
1 2 3 4 ï ò ï ò
1,2 1 2 1,4 5 8
Example: A = 5 6 7 8 . We have A1,2 =
, A2,3 =
5 6 9 12
9 10 11 12
43 / 99
2.3. Rank of a matrix 2.3.1. Rank of a matrix
Rank of a matrix
Rank of a matrix A is the largest order of any non-zero minor in A. The rank of A is denoted by
rank(A), or r (A) (or ρ(A)).
Remark: The rank of the zero matrix A = O is 0.
Thus, rank(A) = r if and only if A has at least a non-zero minor of order r and every minor of order
greater than r (if exist) is equal to 0.
1 2 3 −1
Example: Consider matrix A = 2 1 1 0 .
1 −1 −2 1
The minors of order 3 are
1 2 3 1 2 −1 1 3 −1 2 3 −1
2 1 1 = 0, 2 1 0 = 0, 2 1 0 = 0, 1 1 0 = 0,
1 −1 −2 1 −1 1 1 −2 1 −1 −2 1
1 2
A nonzro minor of order 2 = −3 ̸= 0.
2 1
Hence r (A) = 2.
44 / 99
2.3. Rank of a matrix 2.3.1. Rank of a matrix
Some properties
45 / 99
2.3. Rank of a matrix 2.3.1. Rank of a matrix
Example (GK20201-N3)
0 1 −3
Consider A = m − 1 m − 2 1 , where m is a parameter.
1 m−2 3−m
(a) Find m such that the rank of A is equal to 2.
(b) Find m such that the rank of A3 is less than3.
Part a):
r (A) = 2 ⇒ det(A) = 0.
det(A) = −2m2 + 8m − 8 = −4(m − 2)2 .
det(A) = −4(m − 2)2 = 0 ⇔ m = 2.
Check: if m = 2 then r (A) = 2.
Part b):
r (A3 ) < 3 ⇔ det(A3 ) = 0 ⇔ det(A)3 = 0 ⇔ det(A) = 0.
By part a, m = 2.
46 / 99
2.3. Rank of a matrix 2.3.1. Rank of a matrix
Example:
1 ∗ ∗ ∗ ∗ ∗ ∗ 1 ∗ ∗ ∗ ∗ ∗ ∗
0 0 2 ∗ ∗ ∗ ∗ 0 0 0 3 ∗ ∗ ∗
Matrix
0 0 0 3 ∗ ∗ ∗ is in row echelon form. Matrix 0 0 2 ∗ ∗ ∗ ∗ is not in row
0 0 0 0 0 0 0 0 0 0 0 0 0 0
echelon form.
47 / 99
2.3. Rank of a matrix 2.3.1. Rank of a matrix
Remark
By using repeatly elementary row operations, we can bring any matrix to a matrix in row echelon form.B.
Example:
1 2 3 −1 1 2 3 −1
A := 2 1 1 0 −→ 0
−3 −5 2(H2 ← H2 − 2H1 )
1 −1 −2 1 1 −1 −2 1
1 2 3 −1
−→ 0 −3 −5 2
0 −3 −5 2 (H3 ← H3 − H1 )
1 2 3 −1
−→ 0 −3 −5 2
0 0 0 0 (H3 ← H3 − H2 )
48 / 99
2.3. Rank of a matrix 2.3.1. Rank of a matrix
Proposition
The rank of a matrix in row echelon form is equal to the number of non-zero row of this matrix.
1 ∗ ∗ ∗ ∗ ∗ ∗
0 0 2 ∗ ∗ ∗ ∗
Example: Matrix of form
0 0 0 3 ∗ ∗ ∗ has rank 3.
0 0 0 0 0 0 0
49 / 99
2.3. Rank of a matrix 2.3.2. Evaluation of the rank of a matrix
Remarks:
To compute rank, it is enough to use only elementary row operations
In practice, to compute rank, we can also use elementary column operations.
50 / 99
2.3. Rank of a matrix 2.3.2. Evaluation of the rank of a matrix
Example
1 2 3 −1
Evaluate the rank of A = 2 1 1 0 .
1 −1 −2 1
51 / 99
2.3. Rank of a matrix 2.3.2. Evaluation of the rank of a matrix
Example (GK20213)
1 −2 1 1
2 0 −2 3
Find the rank of A = . Find m such that r (A) = 3.
2 0 1 −3
1 2 −2 2
1 −2 1 1
0 4 −4 1
(H2 ← H2 − 2H1 )
A −→
0 4 −1 −5(H3 ← H3 − 2H1 )
0 4 −3 1 (H4 ← H4 − H1 )
1 −2 1 1 1 −2 1 1
0 4 −4 1 0 4 −4 1
−→ −→ = B.
0 0 3 −6(H3 ← H3 − H2 ) 0 0 1 0
0 0 1 0 (H4 ← H4 − H2 ) 0 0 0 −6
Example (GK20191)
1 0 −1 m
Consider A = 1 −1 3 5 . Find m such that r (A) = 3.
0 −1 4 3
1 0 −1 m
A −→ 0 −1 4 5 − m(H2 ← H2 − H1 )
0 −1 4 3
1 0 −1 m
−→ 0 −1 4 5 − m = B.
0 0 0 m − 2 (H3 ← H3 − H2 )
r (A) = 3 ⇔ r (B) = 3 ⇔ m − 2 ̸= 0 ⇔ m ̸= 2.
53 / 99
2.3. Rank of a matrix 2.3.2. Evaluation of the rank of a matrix
Some exercises
2 m 4 3
(GK20201) Find m such that the rank of A = 1 1 2 2 là lớn nhất.
1 1 2 1
1 −1 2 b
(GK20191-N3) Find the rank of −2 a −4 −1 − b , where a, b are real numbers.
−3 a + 1 −6 −b
1 m −1 2
(GK20181) Find m such that the rank of A = 2 −1 m 5 nhỏ nhất.
1 10 −6 1
1 1 2 b
(GK20181-N2) Find the rank of A = 2 1 −1 2, where a, b are real numbers..
4 3 a 5
1 m 1 m−2
(GK20161) Consider A = 2 2m + 2 m + 1 2m − 1. Find m such that r (A) = 2.
1 m+2 m 2m + 4
54 / 99
2.3. Rank of a matrix 2.3.3. Inverse of a matrix
Định nghĩa
A is said to be invertible if there exists a square matrix B of order n such that n such that
AB = BA = In .
AA−1 = A−1 A = In .
ï ò ï ò
1 2 3 −2
Example: Matrix A = is invertible and A−1 = .
1 3 −1 1
55 / 99
2.3. Rank of a matrix 2.3.3. Inverse of a matrix
Remarks
56 / 99
2.3. Rank of a matrix 2.3.3. Inverse of a matrix
Corollary
Let A and B be square matrices of the same size n. n.
If AB = In then A is invertible, A−1 = B and BA = In .
If BA = In then A is invertible, A−1 = B and AB = In .
57 / 99
2.3. Rank of a matrix 2.3.3. Inverse of a matrix
Some exercises
m+1 m 5
(GK20191-N2) Find m such that matrix A = 1 m 3 − m is nonsingular.
m 0 m+1
−a + 4 −a 3
(GK20161) Find a such that A = 4 1 2 is invertible.
3 −a a + 2
(GK20201*) Let A; B be real square matrices of order n (n ≥ 2) satisfying that AB − nA − B = 0.
Show that A2n+1 B = BA2n+1 . [Hint: AB − nA − B = 0⇒ (A − In )(B − nIn ) = nIn ⇒
(B − nIn )(A − In ) = nIn ⇒ BA − nA − B = 0. Hence AB = BA. ]
(GK20171-N2*) Let n be a positive integer such that there are two square invertible matrices A, B
of order n satisfying that AB + BA = O. Show that n ̸= 2017. [Hint: AB = −BA and use det.]
(GK20161*) Let A, B be square matrices of the same order n ≥ 2 such that AB + A + B = 0.
Show that if A is invertible then B is invertible. [Hint: AB + A + B = 0 ⇒ (A + In )B = −A.
Taking det both sides.]
58 / 99
2.3. Rank of a matrix 2.3.3. Inverse of a matrix
Properties
Let A be an invertible matrix, k ≥ 0 a natural number, 0 ̸= c ∈ K (= R or C). Then A−1 , Ak , cA, AT
are invertible and
−1 1 −1
A−1 = A, (Ak )−1 = (A−1 )k , (cA)−1 = A , (AT )−1 = (A−1 )T .
c
Proposition
Let A and B be invertible matrices of order n. Then AB is also invertible and
(AB)−1 = B −1 A−1 .
Remark: The set GLn (K ) of invertible matrices of order n together with matrix multiplication is a
group.
59 / 99
2.3. Rank of a matrix 2.3.4. Finding the inverse of a matrix
Adjugate matrix
Consider A = [aij ]n×n . Let Cij be the cofactor of aij . Put
C11 C12 . . . C1n C11 C21 ... Cn1
C21 C22 . . . C2n C12 C22 ... Cn2
T
C = . .. .. và C = .. .. ..
.. .. ..
. . . . . . .
Cn1 Cn2 . . . Cnn C1n C2n ... Cnn
60 / 99
2.3. Rank of a matrix 2.3.4. Finding the inverse of a matrix
Example
1 2 −1
Find the adjugate ofA = 2 −1 2 .
3 1 2
−1 2 2 2 2 −1
C11 = + = −4, C12 = − = 2, C13 = + =5
1 2 3 2 3 1
2 −1 1 −1 1 2
C21 = − = −5, C22 = = 5, C23 = − =5
1 2 3 2 3 1
2 −1 1 −1 1 2
C31 = + = 3, C32 = − = −4, C33 = + = −5.
−1 2 2 2 2 −1
The adjugate of A:
C11 C21 C31 −4 −5 3
adj(A) = C12 C22 C32 = 2 5 −4 .
C13 C23 C33 5 5 −5
61 / 99
2.3. Rank of a matrix 2.3.4. Finding the inverse of a matrix
Theorem
1 2 −1 −4 −5 3
Example: A = 2 −1 2 ⇒ det(A) = −5, adj(A) = 2 5 −4 and
3 1 2 5 5 −5
1 2 −1 −4 −5 3 −5 0 0
A · adj(A) = 2 −1 2 2 5 −4 = 0 −5 0
3 1 2 5 5 −5 0 0 −5
−4 −5 3 1 2 −1 −5 0 0
adj(A) · A = 2 5 −4 2 −1 2 = 0 −5 0
5 5 −5 3 1 2 0 0 −5
62 / 99
2.3. Rank of a matrix 2.3.4. Finding the inverse of a matrix
Corollary
If det(A) ̸= 0 then A is invertible and
1
A−1 = adj(A).
det(A)
1 2 −1 −4 −5 3
Example: A = 2 −1 2 ⇒ det(A) = −5, adj(A) = 2 5 −4 and
3 1 2 5 5 −5
−4 −5 3 4/5 1 −3/5
1 1
A−1 = adj(A) = − 2 5 −4 = −2/5 −1 4/5 .
det(A) 5
5 5 −5 −1 −1 1
ï ò ï ò
a b d −b
Example: A = , adj(A) = and if det(A) ̸= 0 then
c d −c a
1
ï ò
−1 d −b
A = .
det(A) −c a
63 / 99
2.3. Rank of a matrix 2.3.4. Finding the inverse of a matrix
Gauss-Jordan method
Let A be a square matrix of order n.
.
1 Write the identity matrix In after the matrix A to form the matrix [A .. In ] of size n × 2n.
. .
2 Use elementary row operations on the entire matrix [A .. In ] về dạng [In .. B]. (If this is not possible,
then A is not invertible.)
3 We have A−1 = B.
. .
[A .. In ] −→ · · · −→ [In .. A−1 ]
64 / 99
2.3. Rank of a matrix 2.3.4. Finding the inverse of a matrix
Example
ï ò
1 2
Use Gauss-Jordan method to find the inverse of A = .
1 3
ï ò ï ò
. 1 2 1 0 1 2 1 0
[A .. I2 ] = −→
1 3 0 1 0 1 −1 1 (H2 ← H2 − H1 )
3 −2 (H1 ← H1 − 2H2 )
ï ò
1 0
−→
0 1 −1 1
ï ò
3 −2
A−1 = .
−1 1
65 / 99
2.3. Rank of a matrix 2.3.4. Finding the inverse of a matrix
1 2 −1
Example: Using Gauss-Jordan method to find the inverse of A = 2 −1 2 .
3 1 2
1 2 −1 1 0 0 1 2 −1 1 0 0
..
[A . I3 ] = 2 −1 2 0 1 0 → 0 −5 4 −2 1 0(H2 ← H2 − 2H1 )
3 1 2 0 0 1 0 −5 5 −3 0 1 (H3 ← H3 − 3H1 )
1 2 −1 1 0 0
−→ 0 −5 4 −2 1 0
0 0 1 −1 −1 1 (H3 ← H3 − H2 )
1 2 0 0 −1 1 (H1 ← H1 + H3)
−→ 0 −5 0 2 5 −4(H2 ← H2 − 4H3)
0 0 1 −1 −1 1
1 2 0 0 −1 1
−→ 0 1 0 −2/5 −1 4/5(H2 ← −15
H2 )
0 0 1 −1 −1 1
1 0 0 4/5 1 −3/5 (H1 ← H1 − 2H2)
.
−→ 0 1 0 −2/5 −1 4/5 = [I3 .. A−1 ].
0 0 1 −1 −1 1
66 / 99
2.3. Rank of a matrix 2.3.4. Finding the inverse of a matrix
AX = B.
If A is invertible then the above equation always has a unique solution:
AX = B ⇔ A−1 AX = A−1 B ⇔ In X = A−1 B ⇔ X = A−1 B.
Basic problem 2
Let A be a square matrix of order n, B matrix of size m × n. Find a matrix X (of sizr m × n) such that
XA = B.
If A is invertible then the above equation always has a unique solution:
XA = B ⇔ XAA−1 = BA−1 ⇔ XIn = BA−1 ⇔ X = BA−1 .
67 / 99
2.3. Rank of a matrix 2.3.4. Finding the inverse of a matrix
Some variants
Given invertible matrices A and B, find X such that AXB = C . Answer: X = A−1 CB −1
Given an invertible matrix A, find X such that AX + B = C . Answer: X = A−1 (C − B).
Given an invertible matrix A, find X such that XA + B = C . Answer: X = (C − B)A−1 .
68 / 99
2.3. Rank of a matrix 2.3.4. Finding the inverse of a matrix
Example (GK20201)
ï ò ï òT
4 1 −1 3
Find matrix X such that X = 2X + .
5 5 2 1
69 / 99
2.3. Rank of a matrix 2.3.4. Finding the inverse of a matrix
Some exercises
ï ò ï ò
1 3 0 4
(GK20201) Consider A = ,B= .
1 2 2 −1
a) Let P(x) = x 2 − 3x − 2. Find P(A).
b) Find matrix X such that (A2 − 3A2 − 2A)XA = AB T .
ï ò ï ò
1 1 2 1
(GK20201-N3) Let A = ,B= . Find matrix X such that A2 XA = AB.
2 1 3 4
ï ò 0 2 1 3
1 −2
(GK20191) Find matrix X such that X − 3 −4 1 = 2 5 1 .
−2 5
3 −2 −3 1
ï ò 1 −1
1 −1
(GK20191-N3) Consider A = , B = 3 0 . Find X such that 2X = B T + AX .
2 5
1 2
1 −1 1 1 3
(GK20181) Find matrix X such that 0 1 2 X = 4 −1.
−1 1 −2 5 7
ï ò ï òT ï ò
2 1 1 3 0 −1
(GK20171) Find matrix X such that X −2 = .
1 1 2 5 1 0
70 / 99
2.4. Systems of linear equations 2.4.1. Definition
2.4.1. Definition
Let K be a field, K = R or K = C.
Linear equation
A linear equation in n variables x1 , . . . , xn is an equation of the form
a1 x1 + a2 x2 + · · · + an xn = b,
a1 s1 + a2 s2 + · · · + an sn = b
71 / 99
2.4. Systems of linear equations 2.4.1. Definition
72 / 99
2.4. Systems of linear equations 2.4.1. Definition
xn bm
3 The system (1) can be presented in the form
Ax = b.
73 / 99
2.4. Systems of linear equations 2.4.2. Cramer’s system
det(A1 ) det(An )
x1 = , . . . , xn = ,
det(A) det(A)
Here Aj is the matrix obtained from A by replacing the j-th column of A by the column b.
74 / 99
2.4. Systems of linear equations 2.4.2. Cramer’s system
Example
x + 2y − z
=1
Consider the system 2x − y + 2z = 1 . Find y .
3x + y + 2z =1
1 2 −1
The determinant of the coefficient matrix of the system 2 −1 2 = −5 is different from 0.
3 1 2
The system is a Cramer’s system.
1 1 −1
|A2 | 3
|A2 | = 2 1 2 = 3 and y = =− .
|A| 5
3 1 2
6
(x = , z = −1.)
5
75 / 99
2.4. Systems of linear equations 2.4.3. General system of linear equations
Augmented matrix
The augmented matrix of the above system is
a11 a12 . . . a1n b1
a21 a22 . . . a2n b2
Ā = [A | b] = .. .. . . .. ..
. . . . .
am1 am2 . . . amn bm
76 / 99
2.4. Systems of linear equations 2.4.3. General system of linear equations
Echelon system
A system of linear equations is said to be in echelon form if its augmented matrix is in row echelon form.
®
x + 2y − z + t =2
z +t =1
77 / 99
2.4. Systems of linear equations 2.4.3. General system of linear equations
Remark
We can solve easily a system in echelon form by using back-substitution.
x + 2y + z = 2
Hệ y + z = 2 has no solution..
0·z =2
x + 2y + z = 2
x = 2 − 2y − z = 1 − 2 · 1 − 1 = −1
System y +z =2 ⇔ y =2−z =1 has a unique solution
2z =2 z =1
(x, y , z) = (−1, 1, 1).
x = 2 − 2y + z − t = 2 − 2a + (1 − b) − b = 3 − 2a − 2b
®
x + 2y − z + t = 2 y = a (a ∈ R)
System ⇔
z +t =1 z = 1 − b
t = b (b ∈ R)
This system has infinitely many solutions, (solutions can be described using 2 parameters)
(x, y , z, t) = (3 − 2a − 2b, a, 1 − b, b), a, b ∈ R.
78 / 99
2.4. Systems of linear equations 2.4.3. General system of linear equations
Consider a system Ax = b in echelon form, with n variables. Let Ā = [A | b] be the augmented matrix of
the system.
Case 1: r (A) < r (Ā). The system has no solution.
Case 2: r (A) = r (Ā) = n. The system has a unique solution.
We first find xn (from the last equation) and subsitute xn into the previous equation to find xn−1 ,
etc.
Case 3: r (A) = r (Ā) < n. The system has infinitely many solutions. The solutions can be described
using n − r parameter, where r := r (A).
We keep r variables (called basic variables) corresponding to r columns containing leading entries
in r non-zero rows. We consider n − r remaining variables as parameters (free variables). We solve
r basic variables (from the last equation backward) in term n − r free variables.
79 / 99
2.4. Systems of linear equations 2.4.3. General system of linear equations
Equivalent systems
Two systems are equivalent if they have the same set of solutions.
Elementary operations
The following operations bring a system to an equivalent system:
1 Interchange two equations,
2 Multiply an equation by a nonzero constant,
3 Add a multiple of an equation to another equation.
80 / 99
2.4. Systems of linear equations 2.4.3. General system of linear equations
Example
x + 2y + z
=2 x + 2y + z = 2
x + 3y + 2z =4 ⇔ y +z = 2 (Eq2 ← Eq2 − Eq1 )
2x + 5y + 5z =8 y + 3z = 4 (Eq3 ← Eq3 − 2Eq1 )
x + 2y + z
=2
⇔ y +z =2
2z = 2 (Eq3 ← Eq3 − 2Eq2 )
82 / 99
2.4. Systems of linear equations 2.4.3. General system of linear equations
Example (GK20191-N2)
x + y − 2z
=1
Solve the system 2x +z = 3 by Gaussian elimination.
3x + y − z =4
Some exercises
x1 + x2 + x4
=3
x − 2x + x
1 3 4 =5
(GK20181) Solve the system
x2 + x3 + 2x4 =3
3x1 + x2 − 3x3 + x4
=8
Solve the following system using Gaussian elimination:
x + 2y − z + 3t = 12
x + 2y − z + 3t =2
2x + 5y − z + 11t
2x + 2y − 5z + 8t
= 49 =2
(GK20171) , (GK20161)
3x + 6y − 4z + 13t = 49
x + 4y + 4z + 6t = 13
x + 2y − 2z + 9t 4x + 8y − 2z + 14t
= 33 = 14
x − 2y + z
=1
(GK20171) Solve the system 2x − 3y + z = 4.
3x − 5y + 2z = 5
84 / 99
2.4. Systems of linear equations 2.4.3. General system of linear equations
Kronecker-Capelli theorem
Consider a system of linear equations Ax = b. he system has a solution if and only if r (A) = r (Ā). (Here
A = [A | b] is the augmented matrix of the system.)
85 / 99
2.4. Systems of linear equations 2.4.3. General system of linear equations
x1 + 2x2 − x3 + 2x4
=b
Example (GK20201) Consider 2x1 + 5x2 + (a + 3)x4 = 1 + 2b , where a, b are constants.
x1 + x2 − 3x3 + x4 = 2b
1 Solve the system when a = b = −1.
2 Find the values of a, b such that the system has infinitely many solutions.
1 2 −1 2 b 1 2 −1 2 b 1 2 −1 2 b
Ā = 2 5 0 a+3 1 + 2b → 0 1 2 a−1 1 → 0 1 2 a−1 1.
1 1 −3 1 2b 0 −1 −2 −1 b 0 0 0 a−2 b+1
If a = b = −1 then r (A) = r (Ā) = 3 < 4 (the number of variables). The system has infinitely many
solutions. Solutions are
86 / 99
2.4. Systems of linear equations 2.4.3. General system of linear equations
87 / 99
2.4. Systems of linear equations 2.4.3. General system of linear equations
Some exercises
x1 + 2x2 + mx3 + (m + 1)x4
=0
(GK20171) Find m such that the system 2x1 + (m + 2)x2 + (2m + 1)x3 + (2m + 4)x4 = 0 has
x1 + (4 − m)x2 + (m − 1)x3 + (2m − 4)x4 =0
infinitely many solutions which can
be described using 2 parameters.
x
1
+ 2x 2 + mx 3 + x4 = −1
(GK20171) Consider the system 2x1 + 5x2 − 2x3 + x4 = −2
x1 + 2x2 − x3 + mx4 = 3
When m = −1, find the rank of the augmented matrix of the system and solve the system
Solve the system (in terms of m).
(CK202161) Find a, b for which the following system has infinitely many solutions with 1 arbitrary
parameter
x1 − x3 + ax4
=2
2x1 − 2x2 + 3x3 + (3a + 1)x4 =b+6
3x1 + 4x2 − 13x3 + (2a − 2)x4 = −b − 1
88 / 99
2.4. Systems of linear equations 2.4.3. General system of linear equations
−2 1 −3 −6
1 0 5 6
(GK20191) Find m such that there exists a matrix X satisfying that
X =
.
−1 2 −1 m
0 1 3 2
(GK20191) Findm such that
the following matrix equation has infinitely many solutions
1 2 m −1
2 7 2m + 1 X = 2 .
3 9 4m 1
mx + 4y − z = 4
(GK20191-N3) Determine the value of m for which the system x − y = 1 has a unique
2x + y + mz = 5
solution.
2x1 + x2 − 3x3
=2
(GK20201-N3) Find a, b such that the following system has a solution 5x1 + 2x2 + x3 = 4.
3x1 + x2 + ax3 =b
89 / 99
2.4. Systems of linear equations 2.4.3. General system of linear equations
90 / 99
2.4. Systems of linear equations 2.4.4. Homogeneous systems
Homogeneous systems
A homogeneous system is a system of the form
a11 x1 + a12 x2 + · · · + a1n xn
=0
a x + a x + · · · + a x =0
21 1 22 2 2n n
. . . . . . . . . . . .
am1 x1 + am2 x2 + · · · + amn xn =0
Matrix form:
Ax = 0.
91 / 99
2.4. Systems of linear equations 2.4.4. Homogeneous systems
Homogeneous systems
onsider a homogenous square system t Ax = 0 in n variables. Only two following cases can occur.
1 Case 1: The system has only the trivial solution. This happens if only if r (A) = n (=the number of
variables). In this case, the system has a unique solution.
2 Case 2: The solution has nontrivial solutions. This happens if only if r (A) < n. In this case, the
system has infinitely many solutions.
92 / 99
2.4. Systems of linear equations 2.4.4. Homogeneous systems
93 / 99
2.4. Systems of linear equations 2.4.4. Homogeneous systems
Example (GK20201)
x + 2y + z
=0
Find the value(s) of m for which the system −x + my − 2z = 0 has nontrivial solutions.
(m + 1)x + y − z =0
1 2 1
The homogeneous square system has nontrivial solutions⇔ det(A) = −1 m −2 = 0.
m+1 1 −1
det(A) = −m2 − 6m − 5.
det(A) = 0 ⇔ m = −1 or m = −5.
94 / 99
2.4. Systems of linear equations 2.4.4. Homogeneous systems
Some exercises
(GK20181-N2)
Find m such that the following system has infinitely many solutions
mx + 2y + z =0
3x − y + 2z = 0.
7x + y + 2mz = 0
(a + 5)x + 3y + (2a + 1)z = 0
(GK20171) Find a such that the system ax + (a − 1)y + 4z = 0 has nontrivial solutions.
(a + 5)x + (a + 2)y + 5z =0
x1 + 2x2 + mx3 + (m + 1)x4
=0
(GK20171) Find m such that the system 2x1 + (m + 2)x2 + (2m + 1)x3 + (2m + 4)x4 = 0 has
x1 + (4 − m)x2 + (m − 1)x3 + (2m − 4)x4 =0
infinitely many solutions which can be described using 2 parameters.
95 / 99