4.1 - Understand Matrices
4.1 - Understand Matrices
4.1 - Understand Matrices
CHAPTER 4: MATRICES
A matrix is a rectangular table of elements (usually called entries), which may be numbers. We are only
going to work with matrices which entries are real numbers.
The horizontal lines in a matrix are called rows and the vertical lines are called columns. A matrix with m
rows and n columns is called an m-by-n matrix (written m × n) and m and n are called its dimensions.
1 0 2
A 3x3 matrix can be: 3 1 4
2 7 6
Observe that almost always upper-case letters denote matrices, while the corresponding lower-case
letters, with two subscript indices, represent the entries, for example, the (i,j)th entry of a matrix A is most
commonly written as ai,j.
The array of numbers inside a matrix is called the elements of the matrix. These numbers are arranged in
rows and columns.
Rows are the horizontally arranged elements of the matrix
For example, the shaded region in the matrix below is the second row of the matrix.
1
Chapter 4 Matrices
1 4 4
0 3 4
0 2 6
2 5 2
Columns are the vertically arranged elements of the matrix.
For example, the shaded region in the matrix below is the second column of the matrix.
1 4 4
0 3 4
0 2 6
2 5 2
Note: It is common practice to use capital letters like A to represent a matrix, and small letters to represent the
elements.
Elements of Matrix
All the number in a matrix are known as the elements of the matrix.
Matrix A has 4
a11 a12 elements
9 4
A =
0 7
a21 a22
Order of Matrix
A matrix which has m rows and n columns is called a matrix of order mxn or mxn matrix.
For example :
If the matrices above are represented by capital letters A,B and C respectively, then the order of each matrix can
be written in subscripts as A3x1, B3x3 andC1x3
2
Chapter 4 Matrices
Example
3 1 1
Given a matrix M =
6 2 5
a. State the order of matrix M
M2x3 or 2 x 3 matrix
Activity
3 1 0 2 3 2
a. 2 3 b. 4 c. 3 1 4 d. 1 9
5 2 7 6 5 7
3 5 3
2. Referring to matrix B = 0 8 4 , state the element at:
1 7 2
a. b23
b. b21
c. b31
a. Square Matrix
A square matrix is a matrix where the number of rows is equal to the number of columns. The following
examples are square matrices.
3
Chapter 4 Matrices
3 2 16 9
3 5 3
3 4 4 5 12 23
0 8 4 0
3 5 1 7 2 21 17 3
1 9 4 15
b. Zero Matrix
A zero matrix is one which has all its elements zero. Here is a 3x3 zero matrix:
In mathematics, particularly linear algebra, a zero matrix or null matrix is a matrix with all its entries being zero.
Some examples of zero matrices are
c. Diagonal Matrix
If all the elements of a square matrix consist of zeros except the diagonal, then this matrix is called a diagonal matrix.
The following examples are diagonal matrices.
a11 0 0 3 0 0
3 0
0 a 22 0 0 8 0
0 a33 0 5 0 0 2
0
d. Identity Matrix
If all the elements of a diagonal matrix consist of the value 1, then the matrix is an identity matrix. The following
examples are identity matrices.
1 0 0 0
1 0 0
1 0 0 1 0 0
I = 0 1 0 I=
0
I=
0 0 1 0 1
0 0 1
0 1
0 0
An identity matrix is special because when you multiply a matrix with it or when you multiply it with a matrix, the
matrix does not change. For examples:
AI = IA = A, IB = BI = B
4
Chapter 4 Matrices
When you interchange the rows of a matrix with its columns, you would have converted a matrix Amn to
another matrix Anm. In other words, a matrix of size m x n will now be of size n x m. This new matrix is
called the transpose of a matrix. The symbol for a transpose of a matrix A is AT. Let’s look at the
following example.
a11 a12
a11 a12 a13
If A = a 21 a 22 , then AT = .
a a21 a22 a23
31 a32
2 0 0 2 2 6
If A = 2 1 6 , then AT = 0 1 0.
6 0 1 0 6 1
(AB)T = BTAT
(ABC…Z)T = ZT…..BTAT
(A + B)T = AT + BT
Addition of matrices can be carried out by adding the corresponding elements of the matrices involved.
Only matrices of the same order can be added.
Example
5
Chapter 4 Matrices
Substraction of matrices can be carried out by substract the corresponding elements of the matrices
involved. Only matrices of the same order can be substracted.
Example
a. Scalar multiplication
To multiply a matrix with a real number, we multiply each element with this number.
Example
2 3 1 2 2 0
1. Express 2 3 4 as a single matrix
1 2 4 5 3 1
Solution :
2 4 12 15 12 4
7 12 8 0
=
10 19 12 4
1 12
=
2 23
6
Chapter 4 Matrices
Multiplication of two matrices, A mxn x B pxq, can only be carried out if n = p ; and the product is a matrix C of order
m x q.
Must be equal
Row 1
1 1 2 0 1(2) (1)(1) 1(0) (1)(4) 1 4
3 2 1 4 3( 2) 2(1) 3( 0) 2( 4) 8 8
A 2x2 B2 x 2 C2 x 2
Steps :
1. Multiply each element in the row i- row of matrix A by the corresponding element in the j-
column of matrix B
2. Sum up all the products obtained in 1. This produces the elements Cij of matrix C.
3. Repeat steps 1 and 2 until the elements from all the rows of matrix A are multiplied by the
corresponding elements from all the columns matrix B.
If the number of elements in row vector is NOT the same as the number of rows in the second matrix then their
product is not defined.
Example:
7
Chapter 4 Matrices
TIPS :
A2 = A X A
Example
3
1 3
21
a) 1 4 b)
2 3 2
Solution
2 1
3 3(1) 3(4) 1 3 1(2) 3(3) 1(1) 3(2)
a) 1 4 = b) 3 2
2 2(1) 2(4)
11 5
3 12
=
2 8
Example
p 3 3 3
1. Given , find the values of p and q.
2 q 2 2
8
Chapter 4 Matrices
Solution
p 3 3 3
,
2 q 2 2
3 p 6 3
6 2q 2
3p – 6 =3 and 6-2q = 2
3p = 9 -2q = -4
p=3 q=2
2 x 1 3 y 0
2. Find the values of x and y which satisfy the matrix equation
3 0 4 2 3 9
Solution:
2 x 1 3 y 0
3 0 4 2 3 9
2 4x 6 2x y 0
3 9 3 9
Thus,6 2 x 0
2 x 6
x 3
And ,2 4 x y
2 4( 3) y
y 14
Activity
5 9 4 0
a) +
6 5 2 8
9
Chapter 4 Matrices
3 1
b)
9 8
3 7 3 4 4 5 4 2
A= B= C= D =
9 5 3 5 2 1 5 7
Determine:
a. A + B
b. A – C
c. D + (B – A)
d. B + C
2 1 0 1
3. Given that A = and B = , Find AB and BA.
4 1 2 3
3 5 3 1 3 5 4 2
2 0 3
4. If P = 0 8 4 , Q = 7 9 7 , R = andS = 6 1 . Find the product of:
1 7 2 5 3 1 1 4 9 3 5
a) PQ b) P2 c) QI d) QR e) RS f) SQ
2 0 2 1 4 1 2
5. Given A = , B = and C = . Find the value for:
3 4 1 3 1 3 0
a) ( A + B )T b) ( AB )T c) CT BT
x 2 2x 3 9 5
a) + =
1 y 2 y 3 8
x 1 5 2 1 2 5 6 2
b) 0 1 7 1 5 0 = 1 5 0
0 y 1 1 0 0 1 0 0
10
Chapter 4 Matrices
The determinant of a square matrix is a special number that can be calculated from the matrix. It is used to
represent the real-value of the matrix which can be used to solve simple algebra problems later on.The symbol for
the determinant of matrix A is det(A) or A.
Determinant of a 2 x 2 matrix
a b
If A = ,
c d
a b
then, det(A) = A = = (ad – bc).
c d
Determinant of a 3 x 3 matrix
The determinant of a 3x3 matrix is a little more tricky and is found as follows ( for this case assume A is an
arbitrary 3x3 matrix A, where the elements are given below)
a 22 a 23 a 21 a 23 a 21 a 22
then A= a11 a12 a13
a32 a33 a31 a33 a31 a32
therefore, A= a11 a 22 a33 a 23 a32 a12 a 21 a33 a 23 a31 a13 a 21 a32 a 22 a31
Example
5 6
1. If A = , determine det(A).
7 8
Solution:
5 6
A= 5(8) 6(7)
7 8
(40 42)
2
11
Chapter 4 Matrices
Example
1 3 2
Determine the determinant of matrix 4 3 0
2 1 2
Solution:
3 0 4 0 4 3
A 1 3 2
1 2 2 2 2 1
1(3( 2) 0(1)) 3( 4( 2) 0( 2)) 2( 4(1) 3( 2))
1(6 0) 3(8 0) 2( 4 6)
1(6) 3(8) 2( 2)
22
Activity
6 13 3 8 4 2
a) b) c)
4 12 5 3 6 3
2 1 6 1 5 3 1 4 2
2. Given that A = 2 3 4 ,B = 1 0 4 and C = 0 4 6
4 2 7 7 2 1 2 5 0
Determine:
12