Math 1164 Lecture 8
Math 1164 Lecture 8
Contents
1 Learning outcomes 1
2 Matrices 1
1 Learning outcomes
At the end of this lecture, students should
1.
2 Matrices
Definition. A matrix of order m × n or dimension over R is a rectangular array of elements of R, arranged
in m rows and n columns.
A matrix of dimension m × n is read “a matrix m by n”. Capital letters are used to denote a matrix, and
elements of the matrix are designed by small letters with subscripts.
A matrix A with m rows and n columns is written as follows:
a11 a12 . . . a1n
a21 a22 . . . a2n
A= ...
... ... ...
am1 am2 . . . amn
where i− and j− represent the row and the column of the element aij of the matrix, respectively.
The m × n matrix A can be written compactly as A = [aij ]m×n or simply as A = [aij ] if the dimension is
known from the contexts.
The set of all m × n matrices over R will be denoted by Mm×n (R) or simply by Mm×n .
Example 1.
1
1 2 3 1 4
A= ∈ M2×3 ; B = ∈ M2×2 ; C = 8 3 4 ∈ M1×3 ; D = 4 ∈ M3×1
4 5 6 5 8
8
1
2. A Column matrix or a column vector is a matrix with a single column.
x1
x2
Example 3. The matrix A = . ∈ M1×n is column matrix.
..
xn
3. A matrix is said to be a square matrix when it has the same number of rows as columns.
1 5
Example 4. A = is a square of the order 2.
8 2
a11 a12 . . . a1n
a21 a22 . . . a2n
B= ...
is a square matrix of the order n.
... ... ...
am1 am2 . . . amn
4. Triangular matrices
- An upper triangular matrix, is a matrix which all the non-zero elements lie on or above, the
main diagonal i.e. it is a square matrix for which aij = 0 whenever i > j.
- A lower triangular matrix, is a matrix which all the non- zero elements lie on or below the main
diagonal i.e. it is a square matrix for which aij = 0 whenever i < j
4 5 4 8 0 0
Example 5. 0 3 1 is an upper triangular matrix and 4 5 0 is a lower triangular
0 0 5 0 4 5
matrix.
5. A diagonal matrix is a square matrix with zeroes everywhere in the matrix except of the principal
diagonal. At least one element of principal diagonal should be non-zero.
In the words A = [aij ]m×n is a diagonal matrix if aij = 0 for i ̸= j.
4 0 0
Example 6. A = 0 5 0 is a 3 × 3 diagonal matrix.
0 0 0
b11 0 . . . 0
0 b22 . . . 0
B= . . . . . . . . . . . . is a n × n diagonal matrix.
0 0 . . . bnn
6. A scalar matrix is a matrix such as which
has the same element in every position of the main diagonal
k, i = j
and zeros elsewhere, i.e., aij = kδkj =
0, i ̸= j
3 0 0
Example 7. A = 0 3 0
0 0 3
7. The unit matrix is a diagonal matrix in which elements are equal to unity i.e. aii = 1. The unit
matrix of the order n is denoted by In .
1 0 0
1 0
Example 8. I2 = ; I3 = 0 1 0 .
0 1
0 0 1
8. A zero matrix or a null matrix is a matrix whose elements are all equal to zero. A zero matrix is
denoted by O.
0 0 0
0 0 0
Example 9. O2×3 = ; O3×3 = 0 0 0 .
0 0 0
0 0 0
MATRIX ALGEBRA
1. Equality of matrices
Two matrices A = [aij ]m×n and B = [bij ]p×q are said to be equal if only if they are identical i.e., they have
to be of the same order m = p and n × q and corresponding elements are the same.
In compact form, A = and aij = bij ,∀i, j.
B, m = p; n = q
1 4 5 1 4 5
Example 10. A = ;B= . A ̸= B because a23 = 8 ̸= −8 = b23 .
6 7 8 6 7 −8
1. Matrix addition
Remark 1.1. We can only add two matrices of the same order.
IfA = [aij ]m×n ; B = [bij ]m×n , then the sum of A and B is denoted by A + B and defined as follows.
det
A + B = [aij ]m×n + [bij ]m×n = [aij + bij ]m×n .
A + B is obtained by adding
the corresponding
elements of A and B.
1 3 8 0 2 4
Example 11. LetA = and B = .
4 5 9 6 7 1
1+0 3+2 8+4 1 5 12
Then A + B = =
4+6 5+7 9+1 10 12 10
The difference of two matrices A and B is denoted by A − B and defined by
h i
A − B = [aij ]m×n − [bij ]m×n = aij + (−b)ij
m×n
Properties
The addition of matrices obeys the commutative and associative laws of addition i.e. ∀ A, B, C ∈ Mm×n :
1. A + B = B + A
2. (A + B) + C = A + (B + C)
3. ∀ A ∈ Mm×n : A + Om×n = Om×n + A
Multiply a matrix A by a constant k is to multiply each element of A by k. Thus k[aij ]m×n =det [kij ]m×n
1 8 9 2×1 2×8 2×9 2 16 18
Example 12. 2 = =
−3 7 6 2 × (−3) 2 × 7 2 × 6 −6 14 12
Properties: ∀A, B ∈ Mm×n ; ∀k, l ∈ R:
1. k(A + B) = kA + kB
2. (k + l)A = kA + lA
3. (kl)A = k(lA)
4. 1 · A = A.
5. Transpose of a matrix
The transpose of a m × n matrix A is the n × m matrix denoted by AT obtained by interchanging the rows
and columns of A. If A = [aij ]m×n , then AT = [aji ]n×m
1 4
1 2 3
Example 13. Let A = ∈ M2×3 then AT = 2 5 ∈ M3×2
4 5 6
3 6
The matrix A is said to be symmetric if AT = A.
The matrix A is said to be skew
symmetric if AT = −A.
1 3
Example 14. A = is a symmetric matrix.
3 4
0 −5
A= is skew symmetric matrix.
5 0
Properties: ∀A, B ∈ Mm×n ; k ∈ R:
T
1. AT =A
T
2. 2. (A ± B) = AT ± B T
3. 3. (kA)T = kAT
4. Matrix multiplication
Remark 1.2. Matrix multiplication is defined only for matrices which are conformable.
Two matrices A and B are conformable with respect to multiplication in the order AB if the number of
columns of A equals the number of rows of B.
Thus if A is of the odder m × n, B has to be of the order n × p.
If A = [aij ]m×n and B = [bij ]n×p , then the product of A and B, denoted by AB, is the m × p matrix
Pn
AB = [cij ]m×p , defined by Cij = k=1 aik bkj , i = 1, ..., m; j = 1, ..., p.
The elements ai1 , ..., anj form the ith row of and the elements of b1j , ..., b1j form the jth column of B. For
any i and j the element cij of AB can be computed in the following way:
Properties
(AB)C = A(BC); (A + B) + C = AB + AC
where A = [aij ]n×n and the sum is extended over all permutations σ of integers 1, 2, ..., n and sgnσ =
1 or −1 according to whether σ is even or odd.
Thus detA is an algebraic sum of all products of n terms which can be formed by selecting one term from
each row and each column of A.
The determinant of the matrix A is denoted by detA or |A|.
Example 17.
a11 a12 3 4
detA = = a11 a22 − a12 a21 ; =3×8−4×5=4
a21 a22 5 8
1 2 4
5 0 3 = (1 × 0 × 8 + 2 × 3 × 7 + 4 × 9 × 5) − (4 × 0 × 7 + 2 × 5 × 8 + 1 × 9 × 3) = 132.
7 9 8
Properties of determinants
1. If rows and columns of a matrix are interchanged, then the value of the determinant of matrix is
unchanged. In other words: |A| = AT .
3 5 3 4
Example 18. = =4
4 8 5 8
1. If two rows or two columns of a determinant are interchanged, then its sign changes.
4 8 3 5
Example 19. =− = −4 (we interchange rows 1and 2).
3 5 4 8
1. If two rows or columns of a determinant are identical, then its value is zero.
5 8 4
Example 20. 3 5 2 = 0because the rows 1 and 3 are identical.
5 8 4
1. If each element of a row or column of a determinant is multiplied by a constant k, then the value of
determinant is multiplied by k.
3k 5k 3k 5 3 5
Example 21. = =k = 4k
4 8 4k 8 4 8
1. If a determinant has two rows or columns which are multiples of each other, then the value of the
determinant is zero.
5 10 1
Example 22. 3 6 5 = 0 because column 2 = 2 × column 1.
2 4 10
1. The value of the determinant is unchanged whenktimes the elements of any row or column is added to
the corresponding elements of any other row or column.
3 5 3 5 3 5
Example 23. = =4=
4+9 8 + 15 13 23 4 8
a11 + b11 a12 ... a1n a11 a12 ... a1n b11 a12 ... a1n
a21 + b21 a22 ... a2n a21 a22 ... a2n b21 a22 ... a2n
1. = +
... .. ... ... ... ... ... ... ... ... ... ...
an1 + bn1 an2 ... ann an1 an2 ... ann bn1 an2 ... ann
3+4 7 7 7 3 7 4 7
Example 24. = + = −21
5+6 8 11 8 5 8 6 8
Example 25.
1 3 5 7 11 16
A= ;B = ; AB = detA = −2; detB = 1; det( AB) = −2 = detA × detB
4 10 2 3 40 58
The minors of any square matrix A are the determinants of square submatrices A.
The minors of A are normally defined with reference to the elements of A.
Let A = [aij ]n×n be a square matrix of order n.
1. The minor of element aij , denoted bymij is the determinant of the submatrix of A obtained by deleting
ith row and jth column.
2. The cofactor of element aij , denoted by Aij is denoted as Aij = (−1)i+j mij . The matrix whose
elements are cofactors of the corresponding elements ofAis called the cofactor matrix of A and
denoted by cof A
Thus cof A = [Aij ]n×n , where Aij is a cofactor of elements aij .
Example 28. Find the minors and cofactors of elements a11 and a23 for matrix A.
a11 a12 a13
A = a21 a22 a23
a31 a32 a33
a22 a23
Solution. m11 = ; A11 = (−1)1+1 m11 = m11
a32 a33
a11 a12
m23 = ; A23 = (−1)2+3 m23 = −m23
a31 a32
2 4
Example 29. Find the cofactor matrix of A =
3 5
Solution.
5 −3
A11 = 5; A12 = −3; A21 = −4; A22 = 2; cof A =
−4 2
The cofactor expansion of determinants
The determinant of a matrix can obtain by a method known as expansion by cofactors.
The rule for expanding the determinant of matrix A is given by:
n
cj X
detA = aij Aij ,
i=1
for fixed j. (Expansion of detA according to the elements of the jth column), or
n
R
X
detA =i aij Aij ,
j=1
th
for fixed j. (Expansion of detA
Pn according to the elements of the i row).
Remark 1.4. δik detA = j=1 aij Akj ,
1, i = k
where δ ik is the Kronecker delta i.e., δik =
0, i ̸= j
a11 a12
Example 30. a) detA = =R1 a11 A11 + a12 A12 =R2 a21 A21 + a22 A22
a12 a22
C1 C
= a11 A11 + a12 A12 =2 a12 A12 + a22 A22 .
2 1 5
3 4 1 5 1 5
b) detA = 1 3 4 =C1 2 −1 +0 =2+7+0=9
2 3 2 3 3 4
0 2 3
The adjoint matrix
The adjoint matrix is the transpose of cofactor matrix. The adjoint matrixAis denoted by adjA and defined
by adjA =det (cof A)T .
Remark 1.5. For any square matrix A, adjA × A = A ×adjA = |A| × In .
−2 1 3
Example 31. Find the adjoint of matrix A defined as: 0 −1 1
1 2 0
−2 1 1 −2 6 4
Solution: cof A = 6 −3 5 ; Hence: adjA = (cof A)T = 1 −3 2 .
4 2 2 1 5 2
Interchanging ith row (or column) with jth row (or column) is denoted
by: Ri ↔ Rj (Ci ↔ Cj ).
Multiplying all the elements of ith row (or column) by k ̸= 0is denoted by:
1. Adding to the elements of ith row (or column)ktimes the corresponding elements of an-
other row (or column).
Adding to the elements of ith row (or column)k times the corresponding elements of jth row (or column) is
denoted by: Ri → Ri + kRj (Ci → Ci + kCj ).
These operations are very useful in expressing the given matrix in particular form.
Two matrices of the same order are said to be equivalent if each can be obtained from the other by applying
a finite number of elementary operations.
Ir 0 Ir
A matrix of one of the forms , Ir 0 , or unit matrix In is called normal form or
0 0 0
canonical form.
A given matrix can be reduced to normal form, using elementary row and column transformations.
Remark 1.6. If the given matrix is nonsingular then its normal for is a unity matrix.
Inverse of non singular matrix via elementary operation
Let A be the given matrix. Start with the identity A = In A = (AIn ).
Use elementary row operations (elementary column operations) only to reduce the matrix A to the normal
form. The same elementary operations in that order should be applied only on In .
The identity A = In A = (AIn ) reduces to I n = BA(??B).
B is the inverse of A in both methods i.e., A−1 = B.
The have the following diagram:
1. A system, in which the constant terms are all zero is called a homogeneous system
2. If least one of the constant terms is not equal to zero, then the system is called non- homogeneous.
3. By a solution of the system (1) we mean an n- tuple of scalars x̃i , i = 1, ..., n for which each of
the m equations is satisfied. In other words, the solution of a system of linear simultaneous equations
is a set of values of the variables which simultaneously satisfy all the equations of the system.
4. To solve the system means to find all solutions. A system of linear simultaneous equations may have
no solution; it may have exactly one solution, referred to as unique solution; or it may have more than
one solution. The first case is a case of an inconsistent system, and the last two cases are cases of
consistent systems of linear simultaneous equations.
Different method can be used to solve the system (1). In our course, we will consider only the system in
which the number of unknowns and the number of equations are equal.
This system is called a square system. Two methods will be discussed.
1. The matrix A = [aij ]n×n is defined as the matrix of coefficients of the variables x1 , ..., xn .
T
2. The matrix B = [b1 b2 ...bn ] is the matrix column of constant terms.
Let ∆ be the determinant of A i.e., ∆ = detA and ∆xi be the determinant of the matrix formed by
interchanging the ith column ofA with the column of constant terms b1 , ..., bn (in the other words, the ith
column of A is replaced by B). Then, the value ofxi is given by: xi = ∆x
∆ , i = 1, ..., n.
i
∆x1 ∆x2 ∆xn
Therefore, the solution set S = ∆ , ∆ , ..., ∆ .
Example 34. Solve thefollowing systems of linear simultaneous equations by Cramer’s rule.
3x − y + z = 3
x + 3y = 8
a) b) x − 2y = 2
4x + 11y = 5
−x + y − 3z = −7
Solutions.
1 3 8 3 1 8
a)∆ = = −1; ∆x = = 73; ∆y = = −27
4 11 5 11 4 5
∆x ∆y
x= = −73; y = = 27; S = {(−73, 27)}
∆ ∆
3 −1 1 3 −1 1
b)∆ = 1 −2 0 = 14; ∆x = 0 −2 0 = 0
−1 1 −3 −7 1 −3
3 3 1 3 −1 3
∆y = 1 2 0 = −14; ∆z = 1 −2 2 = 28
−1 −7 −3 −1 1 −7
∆x ∆y ∆z
x= = 0; y = = −1; z = = 2; S = {(0, −1, 2)}
∆ ∆ ∆
2. Matrix inverse method
Matrix algebra provides a concise way of representing of linear simultaneous equations.
The system (2), can be written in matrix form as follows:
AX = B
T T
where A = [aij ]n×n ; X = [x1 , ..., xn ] ; B = [b1 , ..., bn ]
If we pre-multiply both the left- and right-hand side byA−1 the inverse of A, we would obtain X: A−1 AX =
A−1 B
X = A−1 B(4).
If the matrixA is singular, the inverseA−1 does not exist and the method is not applicable.
Example 35. Solve the following systems of linear equations by matrix method.
x + 2y + 3z = 3
2x + 3y = 7
a) b) 2x + 4y + 5z = 4
x + 5y = 14
3x + 5y + 6z = 8
Solutions. In matrix form, our system can be written as:
−1
2 3 x 7 x 2 3 7 −1
= . Thus = = . Hence S = {(−1, 3)}.
1 5 y 14 y 1 5 14 3
1 2 3 x 3
In matrix form, the system is written as 2 4 5 y = 4
3 5 6 z 8
−1
x 1 2 3 3 7
The solution is given by: y = 2 4 5 4 = −5 . Hence S = {(−7, 5, 2)}
x 2 5 6 8 2
3. Gauss’s method.
ai1
The method use L1 as the pivot of the rows . Then by replacing the rows Li , 2≤i≤p; by Li − L
a11 1
we get
nd rd th
an equivalent system in which the first column is 0 at the 2 ; 3 ; . . . ; p rows. On the next steps we take
L2 ; L3 ; . . . Lp as a pivot and we continue until the matrix of the system became triangular matrix.
Example 36. Solve the system bellow by Gauss’s method
−2x1 + 2x2 −4x3 −6x4 = −4
−3x + 6x + 3x −15x = −3
1 2 3 4
5x1 −8x2 −x3 + 17x4 = 9
x1 + x2 + 11x3 + 7x4 = 7
Solution: In the beginning we simplify every equation for using the simple numbers by replacing L1 by
− 21 .L1 and L2 by 13 . L2 .The system became
x1 − x2 +2x3 +3x4 = 2
−x + 2x + x −5x = −1
1 2 3 4
5x1 −8x2 −x3 + 17x4 = 9
x1 + x2 + 11x3 + 7x4 = 7
We use L3 as a pivot and we replace L4 by 3L3 − 2L4 ; and we obtain a triangular system which is:
x1 − x2 + 2x3 + 3x4 = 2
x + 3x − 2x = 1
2 3 4
−2x3 − 4x4 = 2
4x4 = 12
It is easy to find that x4 = 3 with the fourth line. We deduce by substitution the value of others variables
which are x3 = −7; x2 = 28; x1 = 35 .
Then the solution set is S = {(35 ;28;-7;3)} .
EXERCISES
3 1 4 1 0 2
1. If A = −2 0 1 and B = −3 1 1 , then compute:
1 2 2 2 −4 1
T T T
1. 2A (b) A + B (c) 2A − 3B (d) (2A) − (3B) (e) AB (f) BA (g) AT B T (h) (BA)
2. For each of the following pairs of matrices, determine whether it is possible to multiply the first matrix
times the second. If
it is possible,
perform the
multiplication.
2 1 4 −2
3 5 1
(a) 1 3 (b) 6 −4 1 2 3
−2 0 2
4 1 8 −6
1 4 3 3 2
4 6 3 1 5
(c) 0 1 4 1 1 (d)
2 1 4 1 6
0 0 2 4 5
3. For which of the pairs in exercise 2 is it possible to multiply the second matrix times the first, and what
would the dimension of the product be?
4. Write each of the following
systems of equations as a matrix equation.
x1 + x2 =5 2 x1 + x2 + x3 = 4
3x1 + 3x2 = 1
a) b) 2x1 + x2 − x3 = 6 c) x1 − x2 + 2x3 = 2
2x1 + 3x2 = 5
3x1 − x2 + 2x3 = 7 3x1 − 2x2 − x3 = 0
−1
1
5. Let A = −1 2 2
1 Compute A2 and A3 . What will An turn out to be?
2 2
−1
6. For each of the following, compute (i) det A
(ii) adj(A)and (iii) A
1 3 1 1 1 1
1 2
a) A = b) A = 2 1 1 c) 0 1 1
3 −1
−2 2 1 0 0 1
9. Use Cramer’s rule to solve each of the following systems.
x1 + x2 = 0
2 x1 + x2 + x3 = 4 x1 + x2 = 5
x2 + x3 − 2x4 = 1
a) x1 − x2 + 2x3 = 2 b) 2x1 + x2 − x3 = 6 c)
x1 + 2x3 + x4 = 0
3x1 − 2x2 − x3 = 0 3x1 − x2 + 2x3 = 7
x1 + x2 + x4 = 0
1 2 3
10. Given A 2 3 4
3 4 5
a) Compute the determinant of A. Is A nonsingular? b) Compute adj A and the product A adj A?