Chapter 1 Matrix Algebra
Chapter 1 Matrix Algebra
Matrices
Objectives:
After completing this module, the student should be able to:
identify various types of arrays and matrices, and give their dimensions.
add, subtract and multiply matrices, and multiply matrices by a scalar.
calculate the determinant of a square matrix.
determine the inverse of a matrix.
use the inverse of a matrix to solve a system of linear equations.
The dimension or order of a matrix is the number of rows and the number of columns in
1 2
the matrix, e.g. if A= 0 3 , then the order of A is 4 x 2, since the matrix has 4 rows
4 1
5 6
and 2 columns.
A scalar is a single number as opposed to an array.
All the elements of a null matrix are equal to zero
0 0 0
0 0
e.g. (of order 2 x 2) or 0 0 0 (of order 3 x 3).
0 0 0 0 0
1
If the elements on the main diagonal are equal to one and all the other elements are equal
to zero, the matrix is called a unit matrix or identity matrix, and is usually denoted by
an “I”:
Example
1 0 0
I = 0 1 0 is a 3 x 3 unit matrix or a unit matrix of order 3.
0 0 1
Example
1 0
I= is a 2 x 2 unit matrix, or unit matrix of order 2.
0 1
If the rows of a matrix are changed to columns and the columns to rows, the matrix is
transposed,
1 2
0 3 1 0 4 5
e.g. if C = , then C T = 2 3 1 6 .
4 1
5 6
Exercise 1.1
1. Transpose the following matrices:
1 2 2 1
a) b) 2 3
0 1
2 0 1
c) 1 0 1
d) 2 3 3
4 1 1 2 1
e) f)
2 2 2 1 2
1 1 1 3 3
1 5 0 1
g) h)
1 0 1 2
3 4 2 1
2 1 2 1 1 2
i) j)
0 2 1 2 1 0
2 3 2 1 3 1
2
More definitions
The determinant of a square matrix is a scalar quantity, representing a certain defined
alternating sum of products of elements of the matrix.
1 3
If A = , then the determinant of A is written as follows:
4 2
1 3
det(A) or A = = 10 .
4 2
The determinant of a singular matrix is zero. A non-singular square matrix has an inverse
4 6
e.g. if matrix A = , then
2 3
A = 12 – 12 = 0
Place signs are used in the calculation of determinants. The signs alternate, starting with
a plus i.e.
...
...
...
... ... ... ...
If A is a square matrix, it has a determinant associated with it. Each element of the
determinant gives rise to a cofactor, which consists of the minor of the element together
with its place sign.
1 0 1
If matrix A = 2 2 1 , then the minor of element a33 4 , is determined by
5 3 4
striking out the line and column containing the element 4 and forming a determinant of
1 0
the remaining elements. The minor of element 4 is 2 , and the place sign is +.
2 2
It is interesting to note that the cofactor expansion becomes very laborious for large matrices.
Even for a reasonably modest 11 x 11 matrix, the number of calculations required, is
approximately 108 505 112. If each calculation takes approximately 1 microsecond, then the
following table gives some time estimates:
3
(Greenberg, M.D., Advanced Engineering Mathematics, Prentice-Hall, New Jersey)
n Computing Time
5 0,0003 s
10 10 s
15 4 x10 6 s 40 days
It will not help to use a faster computer either, since even a computer that is a million times as
fast would still take around 10 6 years to evaluate a 25 x 25 determinant. Gaussian elimination
or related techniques are almost always preferred in actual computation for matrices larger
than 3 x 3.
Exercise 1.2
1. Find the matrix of cofactors for the given matrices:
4 1 2 1 2 2
a) b)
3 2 8 0 1 0
3 0 5 1 3 3
Example
If A = 7 2 4 and B = 2 5 8 , then
Scalar Multiplication
If a matrix has to be multiplied by a scalar (a number), then each element of the matrix has to
be multiplied by that number.
Example
4
8 5 1 24 15 3
A = 0 2 3 , then 3A = 0 6 9
1 0 4 3 0 12
Example
If A is a 3x2 matrix, and B is a 3x4 matrix, the product A.B is NOT defined.
If A is a 3x2 matrix, and B is a 2x5 matrix, then A.B IS defined.
Example
2
If A = 2 3 1 and B = 1 , then
4
Example
1 X2
3 1
if C = 3 2 (order 2 X 1) and D = , (order 2 x 2) then
2 4
C D 33 22 31 24
13 11
(order 1 x 2)
AB BA in general
Exercise 1.3
5
Multiply the following matrices:
1 2 3 2 1 1 1
a) 0 1 2 b) 2 3 2 1
c) 0 2 2 0 1 d) 2
1 1 1 0 1 2
3 3 1
4
4 1 1 2 1
e) f)
2 2 3 2 2
4 2 1 2 1 2
1 1 1 3 3
1 5 0 1
g) 1 h) 4 3
1 0 2 1 2 0 2
3 4 2 1
2 1 2 1 1 1 2 1 1 2
i) j)
0 2 1 1 2 1 0 2 4 0
2 3 2 1 1 3 1 2 1 1
Exercise 1.4
2 3 4 6 3 5 2 7
1. If A and B , determine
1 6 0 4 8 1 5 2
a) A B
b) A B
c) C, if 2 A C B
2 7
5 0 4
2. Given that A and B 9 0 , determine
1 5 2 3 8
a) A B b) B A
c) 3A
Equal Matrices
Two matrices are equal if their corresponding elements are equal. This property is often used
to solve for unknown quantities:
Example
2 a 2 5
If A and B , and A B ,
3 b c 3
Solution
3
A A 3 2 x 2
T
x
9 4 x2 (by matrix multiplication)
13 x
2
But A AT 17
13 x 2 17 (given)
x2 4
x 2
Solution
a) A 9.
7
1
Since A 0 , the inverse of A exists and is given by A 1 CT .
A
13 7 8
b) C = 1 4 2
8 5 7
13 1 8
c) C 7 4
T
5 .
8 2 7
13 1 8 139 19 89
A 1 7 4 5 79 5
1 4
d) 9 9
9
8 2 7 89 2
9
7
9
i.e. x A1 b
That means that if we form the inverse of the matrix of coefficients and pre-multiply matrix b
by it, we shall determine the matrix of solutions of x.
Example
To solve the set of equations
x1 2 x 2 x3 4
3x1 4 x 2 2 x3 2
5 x1 3x 2 5 x3 1
a) Write the set of equations in matrix form:
1 2 1 x1 4
3 4 2 x 2
2
5 3 5 x3 1
i.e. A x b x A1 b
b) Calculate the value of the determinant:
8
1 2 1
A 3 4 2 35
5 3 5
14 25 29
C 7 0 7
0 5 10
14 7 0
adj A C 25 0
T
5
29 7 10
14 7 0
1
5
adj A
1
A 25 0
A 35
29 7 10
f) Solve:
14 7 0 4 70
1
5 2 105
1 1
x A b 25 0
35 35
29 7 10 1 140
x1 2
x 2 3
x3 4
x1 2; x2 3; x3 4
Exercise 1.5
3 2 4
1. Show that matrix A is a singular matrix if A = 1 5 3 .
1 8 2
1 4 3
2. If A = 6 2 5 , determine
1 7 0
a) A and
b) adj A
9
3. Solve the following set of linear equations by matrix method:
x1 3x 2 2 x3 3
2 x1 x 2 3x3 8
5 x1 2 x 2 x3 9
j 0 0 1 0 j 1 0
If A = ,B= ,C= and I = , where 1 j , determine
0 j 1 0 j 0 0 1
the following products and express the answers in terms of A, B, C and I.
a) A.B b) B.C
c) C.A d) A2
1 0,5 1 2
5. If A = and B = , determine
0,5 1 2 3
a) B 1 b) A.B
c) B 1 .A
6. For what value of , if any, does the following matrix have an inverse?
1 2
A=
3
cos 4 x
7. Obtain the values of x and y if the matrix A satisfies the
sin y
4
5 4 3 4 x 3 2 5
3
5 4 4 1 2 2 3
8. Given M and its inverse M
1 .
5 4 4 5 6 7 6 y
3 1 1 2 7 7 5 z
1 0 0 0
0 1 0 0
(Hint: M M 1 I ).
0 0 1 0
0 0 0 1
10