Chapter 1 - Matrices
Chapter 1 - Matrices
Electronic lecture
Hoang Hai Ha
HCMUT-OISP
Email: hoanghaiha@hcmut.edu.vn
January 4, 2025
3 Operations on Matrices
4 Inverse of a Matrix
5 Some applications
A=
Denition 1.2
A matrix whose entries are all zero is called a zero matrix, that is
aij = 0, ∀i , j .
Denition 1.2
A matrix whose entries are all zero is called a zero matrix, that is
aij = 0, ∀i , j .
Example 1.2
0 0 0
µ ¶
A=
0 0 0 is the zero matrix of order 2 × 3.
Denition 1.4
A square matrix is called diagonal if all the entries outside the main
diagonal are zeros.
Example 1.4
2 0 0
A = 0 3 0.
0 0 9
Example 1.5
2 8 9
A = 0 1 9 .
0 0 5
⇒ an upper triangular matrix
Example 1.5
2 8 9
A = 0 1 9 .
0 0 5
⇒ an upper triangular matrix
Example 1.6
2 0 0
A = 1 1 0
1 3 5
⇒ a lower triangular matrix.
Denition 1.5
1 0 ... 0
0 1 ... 0
A square matrix I = .. .. . . .. , with 1′ s on the main
. . . .
0 0 ... 1
diagonal and zeros elsewhere, i.e. (aii = 1, i = 1, ..n;aij = 0, ∀i ̸= j) is
called an identity matrix of order n and is denoted by I or In .
Denition 1.5
1 0 ... 0
0 1 ... 0
A square matrix I = .. .. . . .. , with 1′ s on the main
. . . .
0 0 ... 1
diagonal and zeros elsewhere, i.e. (aii = 1, i = 1, ..n;aij = 0, ∀i ̸= j) is
called an identity matrix of order n and is denoted by I or In .
Example 1.7
1 0 0
−x + 3y = −4 (2)
2x − 5y + 5z = 17 (3)
−x + 3y = −4 (2)
2x − 5y + 5z = 17 (3)
y + 3z = 5 (2) .
−y − z = −1 (3)
We
apply some operations on rows
of this matrix:
1 −2 3 9 1 −2 3 9
r2 =r2 +r1
−1 3 0 −4 −−−−−−→ 0 1 3 5
r3 =r3 −2×r1
2 −5 5 17 −
− − −− − −−→ 0 −1 −1 −1
1 −2 3 9
r3 =r3 +r2
−−−−−−→ 0 1 3 5 .
0 0 2 4
We get the last matrix the same with the last system above. Matrix
form is convenient for linear systems with large number of equations
and variables.
1 Interchange 2 rows ri ↔ rj
1 Interchange 2 rows ri ↔ rj
2 Multiply a row through by a nonzero constant: ri → λri ,
(λ ̸= 0).
1 Interchange 2 rows ri ↔ rj
2 Multiply a row through by a nonzero constant: ri → λri ,
(λ ̸= 0).
3 Add a constant times one row to another: ri → ri + λ.rj , ∀λ
1 Interchange 2 rows ri ↔ rj
2 Multiply a row through by a nonzero constant: ri → λri ,
(λ ̸= 0).
3 Add a constant times one row to another: ri → ri + λ.rj , ∀λ
Denition 2.2
The rst non-zero element of each row is called the leading entry of
this row.
Denition 2.2
The rst non-zero element of each row is called the leading entry of
this row.
Denition 2.3
A matrix is said to be in row echelon form if it has the following
conditions
1 Each leading entry is in the column to the right of the leading
entry in the previous row.
2 Rows with all zero elements, if any, are below rows having
non-zero element.
Example 2.1
1 4 −3 7
Example 2.1
1 4 −3 7
Example 2.1
1 4 −3 7
Denition 2.4
We denote A −→ B to show that B is the matrix that results from A
by performing some of the Elementary Row Operations.
Denition 2.5
If Am×n −→ Bm×n , where B is in row-echelon form, then rank of the
matrix A is the number of non-zero rows of matrix B and is denoted
by r (A).
1 r (A) = 0 ⇔ A = 0.
1 r (A) = 0 ⇔ A = 0.
2 0 É r (Am×n ) É min{m, n}.
1 r (A) = 0 ⇔ A = 0.
2 0 É r (Am×n ) É min{m, n}.
1 r (A) = 0 ⇔ A = 0.
2 0 É r (Am×n ) É min{m, n}.
Example 2.3
0 0 2 −4
1 r (A) = 0 ⇔ A = 0.
2 0 É r (Am×n ) É min{m, n}.
Example 2.3
0 0 2 −4
Denition 3.1
If A = (aij )m×n is any m × n matrix, then the transpose of A,
denoted by AT = (aji )n×m is dened to be the n × m matrix that
results by interchanging the rows and columns of A; that is,
a11 a12 ... a 1n a11 a21 . . . am1
a21 a22 ... a 2n a12 a22 . . . am2
A= .. .. ... .. , AT = .. .. ... ..
. . . . . .
am1 am2 . . . amn a1n a2n . . . amn
Denition 3.1
If A = (aij )m×n is any m × n matrix, then the transpose of A,
denoted by AT = (aji )n×m is dened to be the n × m matrix that
results by interchanging the rows and columns of A; that is,
a11 a12 ... a 1n a11 a21 . . . am1
a21 a22 ... a 2n a12 a22 . . . am2
A= .. .. ... .. , AT = .. .. ... ..
. . . . . .
am1 am2 . . . amn a1n a2n . . . amn
Remark
rank(A) = rank(AT ).
⇒ A = 3 4 .
T
5 6
Solution.
1 2 1 3
Solution.
1 2 1 3
Denition 3.2
Two matrices A and B are dened to be equal if they have the same
size and their corresponding entries are equal, i.e.
Denition 3.2
Two matrices A and B are dened to be equal if they have the same
size and their corresponding entries are equal, i.e.
Example 3.3
Find real numbers x , y , z , t such that the following 2 matrices are
equal
x + y 2z + t 3 7
µ ¶ µ ¶
x −y z −t
=
1 5 .
3 = 2
x +y = x
1 = 1
x −y =
y
.
2z + t = 7 ⇔
z = 4
5 = −1
z −t = t
Denition 3.3
If A = (aij )m×n is any matrix and α is any scalar, then the product αA
obtained by the multiplying each entry of the matrix A by α. The
matrix αA is said to be a scalar multiple of A, i.e.
Denition 3.4
If A and B are matrices of the same size, then the sum A + B is the
matrix obtained by adding the entries of B to the corresponding
entries of A.
8 −3 2 + 4 −1 0 =
8 −3 2 + 4 −1 0 =
4 5 4
µ ¶
=
12 −4 2
Denition 3.5
If A = (aij )m×n ∈ Mm×n (K ), B = (bij )n×p ∈ Mn×p (K ).
a11 a12 ... a1n
. .. .. ..
..
. . . b11 b12 ... b1j ... b1p
.. .. .. .. .. ..
ai 1 ai 2 ... ain . . . . . . . =
.. .. .. ..
. . . . bn1 bn2 ... bnj ... bnp n×p
a am 2 ... amn m×n
m1
c11 c12 ... c1j . . . c1p
. .. .. .. .. ..
.
. . . . . .
c ci 2 ... cij ... cip
i1
. .. .. .. .. ..
.
. . . . . .
cm1 cm 2 ... cmj ... cmp m×p
Denition 3.5
If A = (aij )m×n ∈ Mm×n (K ), B = (bij )n×p ∈ Mn×p (K ).
a11 a12 ... a1n
. .. .. ..
..
. . . b11 b12 ... b1j ... b1p
.. .. .. .. .. ..
ai 1 ai 2 ... ain . . . . . . . =
.. .. .. ..
. . . . bn1 bn2 ... bnj ... bnp n×p
a am 2 ... amn m×n
m1
c11 c12 ... c1j . . . c1p
. .. .. .. .. ..
.
. . . . . .
then the product AB is the matrix
c ci 2 ... cij ... cip
i1
. .. .. .. .. ..
.
. . . . . .
cm1 cm 2 ... cmj ... cmp m×p
n
C = A.B = (cij )m×p whose entries are dened by cij = aik .bkj , i = 1..m;j = 1..p
P
k =1
Denition 3.5
If A = (aij )m×n ∈ Mm×n (K ), B = (bij )n×p ∈ Mn×p (K ).
a11 a12 ... a1n
. .. .. ..
..
. . . b11 b12 ... b1j ... b1p
.. .. .. .. .. ..
ai 1 ai 2 ... ain . . . . . . . =
.. .. .. ..
. . . . bn1 bn2 ... bnj ... bnp n×p
a am 2 ... amn m×n
m1
c11 c12 ... c1j . . . c1p
. .. .. .. .. ..
.
. . . . . .
then the product AB is the matrix
c ci 2 ... cij ... cip
i1
. .. .. .. .. ..
.
. . . . . .
cm1 cm 2 ... cmj ... cmp m×p
n
C = A.B = (cij )m×p whose entries are dened by cij = aik .bkj , i = 1..m;j = 1..p
P
k =1
1
2
A.B = ( 2 −1 4 5 ) .
=
0
−1
1
2
A.B = ( 2 −1 4 5 ) .
=
0
−1
³ ´ ³ ´
2 × 1 + (−1) × 2 + 4 × 0 + 5 × (−1) = − 5
1×1
2 1 −1
2 3 1
µ ¶
. 1 3 −2 =
−1 0 1
0 2 1
2
c11 = ( 2 3 1 ) . 1 = 2 × 2 + 3 × 1 + 1 × 0 = 7
0
c12 = ( 2 3 1 ) . 3 = 2 × 1 + 3 × 3 + 1 × 2 = 13
2
−1
c21 = ( −1 0 1 ) . 1 = (−1) × 2 + 0 × 1 + 1 × 0 = −2
0
1
c22 = ( −1 0 1 ) . 3 = (−1) × 1 + 0 × 3 + 1 × 2 = 1
2
−1
c12 = ( 2 3 1 ) . 3 = 2 × 1 + 3 × 3 + 1 × 2 = 13
2
−1
c21 = ( −1 0 1 ) . 1 = (−1) × 2 + 0 × 1 + 1 × 0 = −2
0
1
c22 = ( −1 0 1 ) . 3 = (−1) × 1 + 0 × 3 + 1 × 2 = 1
2
−1
2x1 − x2 = 1
(
.
4x1 + x2 = 3
Remark
AB#BA .
Denition 3.6
If A is a square matrix and
p(x) = a0 + a1 x + a2 x 2 + . . . + am x m
p(A) = a0 I + a1 A + a2 A2 + . . . + am Am . (3)
p(A) = A2 − 2A − 3I =
¸2
−1 2 −1 2 1 0 0 0
· · ¸ · ¸ · ¸
−2 −3
=
0 3 0 3 0 1 =
0 0 .
Denition 3.7
A matrix E is called an elementary matrix if it can be obtained
from an identity matrix I by performing a single elementary row
operation.
Denition 3.7
A matrix E is called an elementary matrix if it can be obtained
from an identity matrix I by performing a single elementary row
operation.
Example 3.10
1 0 0 1 0 3
r1 →r1 +r3 ×3
0 1 0 − −−−−−−−→ 0 1 0 .
0 0 1 0 0 1
| {z }
elementary matrix
Denition 4.1
If A is a square matrix, and if a matrix B of the same size can be
found such that
BA = AB = I , (4)
Denition 4.1
If A is a square matrix, and if a matrix B of the same size can be
found such that
BA = AB = I , (4)
Theorem 4.1
If A is an n × n matrix, then the following statements are equivalent
1 A is invertible;
Theorem 4.1
If A is an n × n matrix, then the following statements are equivalent
1 A is invertible;
Elementary Row Operations
2 A −−−−−−−−−−−−−−−−−−−−−−−−→ In ;
Theorem 4.1
If A is an n × n matrix, then the following statements are equivalent
1 A is invertible;
Elementary Row Operations
2 A −−−−−−−−−−−−−−−−−−−−−−−−→ In ;
3 r (A) = n.
Inversion Algorithm
Elementary Row Operations ¡
(A|I ) −−−−−−−−−−−−−−−−−−−−−−−−→ I |A−1 .
¢
Inversion Algorithm
Elementary Row Operations ¡
(A|I ) −−−−−−−−−−−−−−−−−−−−−−−−→ I |A−1 .
¢
0 1 −1 ¯ −3 0 1 0 0 1 ¯ −1 −1 1
¯
1 2 0 ¯¯ 4 3 −3
¯
r1 →r1 −3r3
r2 →r2 +2r3 r1 →r1 −2r2
−−−−−−−→ 0 1 0 ¯¯ −4 −1 2 −−−−−−−→
0 0 1 ¯ −1 −1 1
1 0 0 ¯¯ 12 5 −7 12 5 −7
¯
0 1 0 ¯ −4 −1 2 . Thus, A−1 = −4 −1 2 .
0 0 1 ¯ −1 −1 1 −1 −1 1
¯
where A = 3 5 4, B = 3 7 9 .
3 6 5 −1 −4 −7
where A = 3 5 4, B = 3 7 9 .
3 6 5 −1 −4 −7
where A = 3 5 4, B = 3 7 9 .
3 6 5 −1 −4 −7
Denition 5.1
Markov Model is a problem in which there is a transition from one
state to another state.
Denition 5.1
Markov Model is a problem in which there is a transition from one
state to another state.
Example 5.1
The market research department at a manufacturing plant determines
that 20% of the people who purchase the plant's product during any
month will not purchase it the next month. On the other hand, 30%
of the people who do not purchase the product during any month will
purchase it the next month. In a population of 1000 people, 100
people purchased the product this month. How many will purchase
the product next month? In 2 months?
Denition 5.2
Cryptogram is a message written according to a secret code. We can
use matrix multiplication to encode and decode messages.
Matrix P is constructed by
Users(Output)
z }|
{
p11 p12 · · · p1n
p21 p22 ... p2n
Supplier(Input) .. .. ..
. . · · · .
pn1 pn2 · · · pnn
24