Lec14 MTH207
Lec14 MTH207
2 Particular Matrices
Identity Matrix
Upper, Lower and Diagonal Matrices
4 Zero-One Matrices
5 Inverse of a Matrix
Matrix Definition
Definition (Matrix)
A matrix (plural matrices) is a rectangular array of numbers, or symbols, arranged in rows and
columns.
Notation:
a11 a12 · · · a1n
a21 · · · · · · a2n
A= . .. .. with a compact form: A = [aij ]
.. ..
. . .
am1 · · · · · · amn
Example
1 −2 −3 2 x
A = 4 8 −6 , B = −1 , X = y
7 0 1 1 z
Example
2
1 −2 −3 −1 x
A = 4 8 −6 , B=
1 ,
X = y
7 0 1 z
5
A + B = [aij + bij ]
Example
Find A + B :
1 −2 −3 7 0 1
1 A = , B=
4 8 −6 −4 0 −6
3 2 8 0 −1
2 A= , B=
−7 0 0 0 2
Example
2 4 2 −1 −6 3
2 −1 = −2 , −3 −1 2 = 3 −6
1 2 4 5 −12 −15
n
X
cij = ai1 b1j + ai2b2j + ai3 b3j + ... + ain bnj = aik bkj .
k =1
Solution:
−14 1 −3
−1 −1
AB = 12 6 30 , BA =
20 −22
−14 −2 −15
AB ̸= BA
n
X
cij = ai1 b1j + ai2b2j + ai3 b3j + ... + ain bnj = aik bkj .
k =1
Solution: The multiplication AB between the matrices A and B is not defined, since the
number of columns of the matrixA = 2 ̸= 3 = number of rows of the matrix B. However:
5 8
BA = 17 26
15 24
Solution:
3 3
AB =
0 0
1 1
BA =
2 2
AB ̸= BA
Solution:
AB = 1
2 −4 −6
BA = −1 2 3
1 −2 −3
AB ̸= BA
Remark
In general, AB ̸= BA. Matrix multiplication is not commutative.
Ak = A.A.A...A, k times.
Example
1 1
Find A3 with A = .
1 1
Solution:
2 Particular Matrices
Identity Matrix
Upper, Lower and Diagonal Matrices
4 Zero-One Matrices
5 Inverse of a Matrix
Theorem:
Let A, B and C be three matrices (such the following operations are defined), and let α and β
be two scalars. Then the following statements are true:
1) A + B = B + A.
2) (A + B) + C = A + (B + C).
3) (AB)C = A(BC).
4) A(B + C) = AB + AC.
5) (A + B)C = AC + BC.
6) (αβ)A = α(βA) = β(αA).
7) α(AB) = (αA)B = A(αB).
8) (α + β)A = αA + βA.
9) α(A + B) = αA + αB.
Example
Let
1 2 2 1 1 0
A= , B= and C = .
3 4 −3 2 2 1
Verify that A(BC) = (AB)C and A(B + C) = AB + AC.
Solution:
1 2 4 1 6 5
A(BC) = =
3 4 1 2 16 11
−4 5 1 0 6 5
(AB)C = =
−6 11 2 1 16 11
Thus
A(BC) = (AB)C.
Example
1 2 3 1 1 7
A(B + C) = =
3 3 −1 3 5 15
−4 5 5 2 1 7
AB + AC = + =
−6 11 11 4 5 15
Hence, A(B + C) = AB + AC.
2 Particular Matrices
Identity Matrix
Upper, Lower and Diagonal Matrices
4 Zero-One Matrices
5 Inverse of a Matrix
Definition
1) A row Matrix, is a matrix of size 1 × n has the following form
3) A square matrix, is a matrix of size n × n, equivalently, the number of rows is equal the
number of columns.
4) The zero matrix of size m × n, denoted by Omn , is the matrix with all the entries are
equal to zero.
Special Matrices
Example
Solve for X in the equation 3X + A = B with
1 −2 −3 4
A= and B =
0 3 2 1
1
Solution: 3X + A = B =⇒ 3X = B − A =⇒ X = 3
(B − A). Hence
" #
− 43
−4 6 2
B−A= =⇒ X = 2
2 −2 3
− 23
2 Particular Matrices
Identity Matrix
Upper, Lower and Diagonal Matrices
4 Zero-One Matrices
5 Inverse of a Matrix
Example
1 2 3 4
5 6 7 8
A=
9 10 11 12
13 14 15 16
Diagonal of a matrix
Definition
Let A = [aij ] be a square matrix. The Diagonal of A is the set that contains the entries aij
such that i = j.
Example
1 2 3 4
5 6 7 8
A= . The diagonal of A is S = {1, 6, 7, 16}.
9 10 11 12
13 14 15 16
Identity Matrix
Definition
The n × n identity matrix is the matrix In = [δij ] with
1 if i = j,
δij =
0 if i ̸= j.
Example
1 0 0 0
1 0 0 1 0 0
I2 = I4 = .
0 1 0 0 1 0
0 0 0 1
Identity Matrix
Theorem
Let A be an m × n matrix. Then, the following statements are true:
1 AIn = A.
2 Im A = A.
Example
3 4 1
A = 2 6 3. Show that I3 A = AI3 = A.
0 1 8
Solution: Homework.
2 Particular Matrices
Identity Matrix
Upper, Lower and Diagonal Matrices
4 Zero-One Matrices
5 Inverse of a Matrix
Definition
Let A = [aij ] ∈ Mn,n (R).
1- The matrix A is said to be an upper triangular matrix if aij = 0 for all i > j and there exists
aij ̸= 0 for i < j.
2- The matrix A is said to be an lower triangular matrix if aij = 0 for all i < j and there exists
aij ̸= 0 for i > j.
3- The matrix A is said to be a diagonal matrix if aij = 0 for all i > j, i < j, and there exists
aii ̸= 0.
Example
1 −2 3 7 0 0 1 0 0
A = 0 0 0 B = −1 3 0 C = 0 −5 0
0 0 5 1 4 −5 0 0 5
2 Particular Matrices
Identity Matrix
Upper, Lower and Diagonal Matrices
4 Zero-One Matrices
5 Inverse of a Matrix
bij = aji
for i = 1, · · · , m and j = 1, · · · , n.
Example
Determine the Transpose of the following Matrices:
1 2 3
1 A = .
4 5 6
Example
−3 2 1 −3 4 1
2 B= 4 T
3 2 =⇒ B = 2 3 2.
1 2 5 1 2 5
1
C = 2 =⇒ C T = 1 2 −10 .
3
−10
Example
2 3 4 2 3 4
1 A = 3 1 T
5 =⇒ A = 3 1 5 =⇒ A = AT
4 5 3 4 5 3
=⇒ A is symmetric.
0 1 2 0 −1 −2
2 B = −1 0 3 =⇒ B T = 1 0 −3 =⇒ B T = −B
−2 −3 0 2 3 0
=⇒ B is skew-symmetric.
0 1 2 0 1 2
3 C = 1 1 T
2 =⇒ C = 1 1 −2
2 −2 −3 2 2 −3
Example
1 2 1 1 0 2
Calculate (AB)T in two methods, where A = 3 3 5 and B = 2 1 1.
2 4 1 5 4 1
Solution:
First method:
10 6 5 10 34 15
AB = 34 23 T
14 =⇒ (AB) = 6 23 8 .
15 8 9 5 14 9
Example
Second method:
1 3 2 1 2 5
AT = 2 3 4 and B T = 0 1 4. Then
1 5 1 2 1 1
1 2 5 1 3 2 10 34 15
T T T
(AB) = B A = 0 1 4 2 3 4 = 6 23 8 .
2 1 1 1 5 1 5 14 9
Example
1 3 2
Given A = , Find AAT and (AAT )T . What can you conclude?
2 3 4
2 Particular Matrices
Identity Matrix
Upper, Lower and Diagonal Matrices
4 Zero-One Matrices
5 Inverse of a Matrix
Zero-One Matrices
Definition
A matrix all of whose entries are either 0 or 1 is called a zero-one matrix. Algorithms using
these structures are based on Boolean arithmetic with zero-one matrices. This arithmetic is
based on the Boolean operations ∧ and ∨, which operate on pairs of bits, defined by
1 if b1 = b2 = 1,
b1 ∧ b2 =
0 otherwise.
1 if b1 = 1 or b2 = 1,
b1 ∨ b2 =
0 otherwise.
Definition
Let A = [aij ] and B = [bij ] be m × n zero-one matrices. Then the join of A and B is the
zero-one matrix with (i, j)th entry aij ∨ bij . The join of A and B is denoted by A ∨ B. The meet
of A and B is the zero-one matrix with (i, j)th entry aij ∧ bij . The meet of A and B is denoted
by A ∧ B.
Example
Find the join and meet of the zero-one matrices
1 0 1 0 1 0
A= , B=
0 1 0 1 1 0
Solution
1∨0 0∨1 1∨0 1 1 1
A∨B = =
0∨1 1∨1 0∨0 1 1 0
1∧0 0∧1 1∧0 0 0 0
A∧B = =
0∧1 1∧1 0∧0 0 1 0
Remark
Note that the Boolean product of A and B is obtained in an analogous way to the ordinary
product of these matrices, but with addition replaced with the operation ∨ and with
multiplication replaced with the operation ∧.
Example
Find the Boolean product of A and B, where
1 0
1 1 0
A = 0 1 , and B =
0 1 1
1 0
Solution
(1 ∧ 1) ∨ (0 ∧ 0) (1 ∧ 1) ∨ (0 ∧ 1) (1 ∧ 0) ∨ (0 ∧ 1) 1 1 0
A ⊙ B = (0 ∧ 1) ∨ (1 ∧ 0) (0 ∧ 1) ∨ (1 ∧ 1) (0 ∧ 0) ∨ (1 ∧ 1) = 0 1 1
(1 ∧ 1) ∨ (0 ∧ 0) (1 ∧ 1) ∨ (0 ∧ 1) (1 ∧ 0) ∨ (0 ∧ 1) 1 1 0
Hence
A[r ] = A ⊙ A ⊙ · · · ⊙ A
| {z }
r times
Example
0 0 1
Let A = 1 0 0. Find A[n] for all positive integers n.
1 1 0
Solution
We find that
1 1 0
[2]
A = A ⊙ A = 0 0 1
1 0 1
We also find that
1 0 1 1 1 1
[3] [2] [4] [3]
A =A ⊙ A = 1 1 0 , and A = A ⊙ A = 1 0 1
1 1 1 1 1 1
2 Particular Matrices
Identity Matrix
Upper, Lower and Diagonal Matrices
4 Zero-One Matrices
5 Inverse of a Matrix
Definition
Let A be n × n Matrix.
The matrix A is said to be nonsingular or Invertible if there exists a matrix B such that:
AB = BA = In
Definition
Let A be n × n Matrix.
The matrix A is said to be nonsingular or Invertible if there exists a matrix B such that:
AB = BA = In
Example
" #
1 2
2 4 − 10 5
a) The matrices and 3 are the inverses of each other.
3 1 10
− 15
Definition
Let A be n × n Matrix.
The matrix A is said to be nonsingular or Invertible if there exists a matrix B such that:
AB = BA = In
Example
" #
1 2
2 4 − 10 5
a) The matrices and 3 are the inverses of each other. Since
3 1 10
− 15
" 1 2
#
2 4 − 10 5 1 0
3 = = I2
3 1 10
− 51 0 1
Definition
Let A be n × n Matrix.
The matrix A is said to be nonsingular or Invertible if there exists a matrix B such that:
AB = BA = In
Example
" #
1 2
2 4 − 10 5
a) The matrices and 3 are the inverses of each other. Since
3 1 10
− 15
" 1 2
#
2 4 − 10 5 1 0
3 = = I2
3 1 10
− 51 0 1
and
Definition
Let A be n × n Matrix.
The matrix A is said to be nonsingular or Invertible if there exists a matrix B such that:
AB = BA = In
Example
" #
1 2
2 4 − 10 5
a) The matrices and 3 are the inverses of each other. Since
3 1 10
− 15
" 1 2
#
2 4 − 10 5 1 0
3 = = I2
3 1 10
− 51 0 1
and " #
1 2
− 10 5 2 4 1 0
3 = I2 .
10
− 15 3 1 0 1
Example
1 2 3 1 −2 5
b) The 3 × 3 matrices 0 1 4 and0 1 −4 are the inverses of each other,
0 0 1 0 0 1
Example
1 2 3 1 −2 5
b) The 3 × 3 matrices 0 1 4 and0 1 −4 are the inverses of each other,
0 0 1 0 0 1
since
1 2 3 1 −2 5 1 0 0
0 1 4 0 1 −4 = 0 1 0 = I3
0 0 1 0 0 1 0 0 1
and
1 −2 5 1 2 3 1 0 0
0 1 −4 0 1 4 = 0 1 0 = I3 .
0 0 1 0 0 1 0 0 1
Remark:
An n × n matrix is said to be Singular or Non-Invertible if it does not have an inverse.
Remark:
An n × n matrix is said to be Singular or Non-Invertible if it does not have an inverse.
Example
1 0
The matrix A = is a singular one. Why?
0 0
2 Particular Matrices
Identity Matrix
Upper, Lower and Diagonal Matrices
4 Zero-One Matrices
5 Inverse of a Matrix
Strategy
a b
If A = is an 2 × 2 matrix
c d
Strategy
a b
If A = is an 2 × 2 matrix such that ad − bc ̸= 0,
c d
Strategy
a b
If A = is an 2 × 2 matrix such that ad − bc ̸= 0,then A is invertible and its inverse is
c d
given by
Strategy
a b
If A = is an 2 × 2 matrix such that ad − bc ̸= 0,then A is invertible and its inverse is
c d
given by
1 d −b
A−1 = .
ad − bc −c a
Strategy
a b
If A = is an 2 × 2 matrix such that ad − bc ̸= 0,then A is invertible and its inverse is
c d
given by
1 d −b
A−1 = .
ad − bc −c a
Example
2 4
a) A = .
1 −3
Strategy
a b
If A = is an 2 × 2 matrix such that ad − bc ̸= 0,then A is invertible and its inverse is
c d
given by
1 d −b
A−1 = .
ad − bc −c a
Example
2 4
a) A = . ad − bc = −10 ̸= 0
1 −3
Strategy
a b
If A = is an 2 × 2 matrix such that ad − bc ̸= 0,then A is invertible and its inverse is
c d
given by
1 d −b
A−1 = .
ad − bc −c a
Example
2 4
a) A = . ad − bc = −10 ̸= 0
1 −3
=⇒ A−1 =
Strategy
a b
If A = is an 2 × 2 matrix such that ad − bc ̸= 0,then A is invertible and its inverse is
c d
given by
1 d −b
A−1 = .
ad − bc −c a
Example
2 4
a) A = . ad − bc = −10 ̸= 0
1 −3
1 −3 −4
=⇒ A−1 = − =
10 −1 2
Strategy
a b
If A = is an 2 × 2 matrix such that ad − bc ̸= 0,then A is invertible and its inverse is
c d
given by
1 d −b
A−1 = .
ad − bc −c a
Example
2 4
a) A = . ad − bc = −10 ̸= 0
1 −3
" #
1 −3
3 2
−4
=⇒ A−1 = − = 101
5 .
10 −1 2 10
− 15
Strategy
a b
If A = is an 2 × 2 matrix such that ad − bc ̸= 0,then A is invertible and its inverse is
c d
given by
1 d −b
A−1 = .
ad − bc −c a
Example
2 4
a) A = . ad − bc = −10 ̸= 0
1 −3
" #
1 −3
3 2
−4
=⇒ A−1 = − = 101
5 .
10 −1 2 10
− 15
1 2
b) B = .
2 4
Strategy
a b
If A = is an 2 × 2 matrix such that ad − bc ̸= 0,then A is invertible and its inverse is
c d
given by
1 d −b
A−1 = .
ad − bc −c a
Example
2 4
a) A = . ad − bc = −10 ̸= 0
1 −3
" #
1 −3
3 2
−4
=⇒ A−1 = − = 101
5 .
10 −1 2 10
− 15
1 2
b) B = . ad − bc = 0
2 4
Strategy
a b
If A = is an 2 × 2 matrix such that ad − bc ̸= 0,then A is invertible and its inverse is
c d
given by
1 d −b
A−1 = .
ad − bc −c a
Example
2 4
a) A = . ad − bc = −10 ̸= 0
1 −3
" #
1 −3
3 2
−4
=⇒ A−1 = − = 101
5 .
10 −1 2 10
− 15
1 2
b) B = . ad − bc = 0 =⇒ B is a singular matrix.
2 4