Maths Chapter 2 Matrix 22-1
Maths Chapter 2 Matrix 22-1
Definition of a Matrix
A matrix is a rectangular array of numbers, parameters, or variables each of which has a carefully ordered
place within the matrix. The numbers (parameters or variables) are referred to as elements of the matrix. The
numbers in the horizontal like are called rows; the numbers in a vertical line are called columns. It is
customary to enclose the elements of a matrix in parentheses, brackets, or braces to signify that they must be
considered as a whole and not individually.
A matrix is any rectangular form of numbers arranged in rows and columns. Rows of a matrix are
numbered from top to the bottom & Columns of a matrix are numbered from left to right. A matrix is
often denoted by a single letter in bold face type. The first subscript in a matrix refers to the row and the
second subscript refers to the column. A general matrix of order m x n is written as:
X= x11 x12 x1n
x 21 x22 x2n
If a matrix has m rows and n columns thus, m by n is called order (dimension) of a matrix. In matrix X, the
subscript numbers represents the row and the column on which an entry (member) is located. On the matrix
X, from the above example; x11 means, ‘x’ is located on the first row and first column of matrix X, x21
means, ‘x’ is located on the second row and first column of matrix X, xmn means ‘x’ is located on the mth
row and nth column.
Example:
Here A is a general matrix composed of 3x3=9 elements, arranged in three rows and three columns. The
elements all have double subscripts which give the address or placement of the element in the matrix; the
first subscript identifies the row in which the element appears and the second identifies the column. For
instance, a23 is the element which appears in the second row and the third column and a32 is the element
which appears in the third row and the second column.
1
Dimensions and Types of Matrices
Dimension of a matrix is defined as the number of rows and columns.
Based on their dimension (order), matrices are classified into the following types:
A. A row matrix: is a matrix that has only one row and can have many columns.
E .g. A= 2 5 7 is a row matrix of order 1x3.
B. A column matrix: is a matrix with one column and can have many rows.
E.g. B = 1
2
6 is a column matrix of dimensions 3x1.
Vector Matrix: - Matrices with only one row or one column. These matrices can also be referred to
as row and column matrices.
C. A square matrix: is a matrix with equal number of rows and columns.
1 4 3
E.g. C = 6 ; D= 2 6 2 2 5
3 8 ; E= 8 6 9
D. A diagonal matrix: is a square matrix where its all non- diagonal elements are zero.
E.g. x = 2 0 0
0 6 0 is a diagonal matrix of order 3x3.
0 0 11
E. A scalar matrix: a square matrix is called a scalar matrix if all its non-diagonal elements are zero and
all diagonal elements are equal.
E.g. Y = 2 0 Z= 6 0 0
0 6 0
0 2 0 0 6
F. A unit matrix (Identity matrix): is a type of diagonal matrix where its main diagonal elements are
equal to one.
1 0 0
E.g. B = 0 1 0
0 0 1
G. A null matrix (zero matrix): a matrix is called a null matrix if all its elements are zero.
0 0 0
E.g. A= 0 0 0
0 0 0
2
H. A symmetric matrix: a matrix is said to be symmetric if A = At.
E.g. A = 8 2 1
2 3 4
1 4 5
It is seen above that every scalar matrix is a diagonal matrix; whereas a diagonal matrix need not be
a scalar matrix. Every unit matrix is a scalar matrix; whereas a scalar matrix need not be a unit
matrix.
If A= (aij) and B= (bij), then C = A+B is the matrix having a general element of the form; Cij = aij + bij.
D = A-B → Dij = aij - bij .
Example:
A= 2 0 B= 3 6
-5 6 4 1
Then;
2+3 0+6 5 6
1 5 10 2
If A= 6 7 B=
8 9 8 6
4
NB: The subtraction (difference) of two matrices of the same order is obtained by subtracting corresponding
elements.
4. Matrix Multiplication
Two matrices A and B can be multiplied together to get AB if the number of columns in A is equal to the
number of rows in B.
A B
n x s
mxn
Inner dimension
Outer dimension
If two matrices have the same inner dimension, then we can get the product of the matrices. The
resulting matrix will have a dimension equal to the outer dimensions of the two matrices. There are
two types of matrix multiplication: multiplication by a scalar and multiplication by a matrix.
i. Scalar multiplication: in this type of multiplication, we multiply the scalar by each element of
the given matrix.
3 4 0
E.g. If B = 1 2 5
3 4 1
3 4 0 15 20 0
(5)*B = (5) =
1 2 5 5 10 25
3 4 1 15 20 5
5
Then, A x B = (1x2) + (2x3) (1x1) + (2x0) (1x4) + (2x5)
8 1 14
AxB =
18 3 32
3 0 5 (3x3)
4,000 (3x1)
6
Total interest = (Interest rate matrix)*(Investment matrix) = I.B.
3,000
I.B = 0.06 0.07 0.08 .
2,000
4,000
If the cost of each chair (A, B and C) is Birr 1,000, 2,000 and 3,000 respectively, and the selling price is
Birr 1,500, 3,000 and 4,000 respectively;
a) Find the total cost of the factory for the total sale made.
b) Find the total profit of the factory.
Solution:
Given: Let the quantity matrix be q
Let the price matrix be p
Let the unit cost matrix be v;
a) 400 300 200 1,500 1,000
q= p= V=
3,000 2,000
300 200 100
4,000 3,000
. 2,000 = 1,000,000
300 200 100
3,000
7
b) Total profit = Total Revenue - Total Cost
Determinant of a matrix
Definition: the determinant is a single number or scalar and is found only for square matrices.
i. Let A = a11 (1x1), then the determinant of A denoted by A or det A is a11.
A = a11 a12
a21 a22
Is known as a determinant of order two and its value is given as: A = a11a22 - a12a21.
7 9 ; 7 9
iii. Let A = a11 a12 a13
a21 a22 a23
a31 a32 a33
= a11 (a22 a33 - a32 a23) – a12 (a21 a33-a31a23) + a13 (a21a32-a31a22)
8
E.g. Let A= 1 2 4
0 -1 0
-2 0 3 ; Find A .
A = 1 2 4 -1 0 0 0 0 -1
0 -1 0 = +1 -2 +4
-2 0 3 0 3 -2 3 -2 0
a11 a12
Given : A =
a 21 a22
9
Example: If A = 2 1
0 4 ; then,
The minor of a11, /m11/, the element in the first row and first column is; /m11/ = /4/ = 4
The minor of a12, /m12/ = 0
The minor of a21, /m21/ =1
The minor of a22, /m22/ = 2
The cofactor (Cij) of the element aij of the matrix A is the minor of aij multiplied by (-1)i+j; so that if i+j
is even, the cofactor and the minor are equal, and if i+j is odd, the cofactor is the negative of the minor.
The adjoint of A is the transpose of the cofactor matrix of A.
Adjoint of (A), which is the transpose of the cofactor matrix (ct ) is given by :
Adjoint (A) = ct = 4 -1
0 2
Inverse of a Matrix
In scalar algebra, the inverse of a number is that number which, when multiplied by the original number,
gives a product of 1. Hence, the inverse of x is simply 1/x; or in slightly different notation, x-1. In matrix
algebra, the inverse of a matrix is that which, when multiplied by the original matrix, gives an identity
matrix. The inverse of a matrix is denoted by the superscript “-1”. Hence, AA-1 = A-1A = I.
10
Note that: A matrix must be square to have an inverse, but not all square matrices have an inverse. The
necessary and sufficient condition for a square matrix to possess its inverse is that /A/ ≠ 0.
Finding the inverse of a matrix requires the concept of row operations to be performed. The row operations
are the following:
a. Multiply or divide a row by a non- zero constant;
b. Add a multiple of one row to another row;
c. Interchanging of rows;
The most important methods to find inverse of a given matrix include the following:
1. Gauss- Jordan Inversion method
2. The zero-first method
3. The cofactor technique
Example: Find the inverse of the following matrix using the Gauss- Jordan method.
3 2
A= 1 1
Solution
Steps:
1st: write the given matrix at the left and the corresponding identity matrix at the right;
3 2 1 0
A/I =
1 1 0 1
N.B: corresponding identity matrix for 2x2 matrix is of dimension 2x2.
2nd : Interchange R1 and R2;
3 2 1 0 1 1 0 1
1 1 0 1 3 2 1 0
11
3rd: Multiply R1 by -3 and add the result to R2;
-3 R1 = -3 -3 0 -3
+
R2 = 3 2 1 0
New R2 0 -1 1 -3
The resulting matrix is given by:
1 1 0 1
0 -1 1 -3
0 1 -1 3
Exercise
1.Find the inverse of matrix B (B-1) using Gauss- Jordan Inversion method: B = 2 2 3
0 1 1
4 0 3
12
The Zero – first method
In using this method, first find zeros in the off-diagonal followed by ones in the main diagonal.
Example:
If C = 2 3
4 7 ; Find C-1 using zero –first method.
Solution:
1st → Write the augmented matrix; (C/I)
2 3 1 0
4 7 0 1
2nd → To translate the off- diagonal element in the second row and first column (i.e., 4) into zero; the
elementary row operation is; -2R1 + R2;
-2R1 = -4 -6 -2 0
+
R2 = 4 7 0 1
New R2 0 1 -2 1
3rd →To translate the remaining off – diagonal element (i.e., 3) into zero; the elementary row operation is;
-3R2 + R1;
-3R2 = 0 -3 6 -3
+
R1 = 2 3 1 0
New R1 2 0 7 -3
2 0 7 -3
The resultant matrix is;
0 1 -2 1
4th → To translate the main- diagonal entry (i.e., 2) into one; the elementary row operation is; R1/2;
R1/2 = 1 0 7/2 -3/2
The final resultant matrix is given by:
1 0 7/2 -3/2
0 1 -2 1
13
Check: C.C-1 = C-1 = I
2 3 7/2 -3/2 1 0
4 7 -2 1 0 1
Example 2: Find the inverse of the following matrix by using the zero – first method.
0 -1 1
D= -1 1 2
1 0 -2
Solution:
1st →Write the augmented matrix;
0 -1 1 1 0 0
-1 1 2 0 1 0
1 0 -2 0 0 1
N.B: the corresponding identity matrix for a 3x3 matrix is of dimension 3x3.
2nd →Interchange R1 and R3;
The resultant matrix is given by; 1 0 -2 0 0 1
-1 1 2 0 1 0
0 -1 1 1 0 0
3rd → Add R1 to R2;
R1 = 1 0 -2 0 0 1
+
R2 = -1 1 2 0 1 0
New R2 0 1 0 0 1 1
The resultant matrix is given by:
1 0 -2 0 0 1
0 1 0 0 1 1
0 -1 1 1 0 0
4th → Add R2 to R3;
R2 = 0 1 0 0 1 1
+
R3 = 0 -1 1 1 0 0
New R3 0 0 1 1 1 1
The resultant matrix is given by:
1 0 -2 0 0 1
0 1 0 0 1 1
0 0 1 1 1 1
14
5th →2R3 + R1 ;
2R3 = 0 0 2 2 2 2
+
R1 = 1 0 -2 0 0 1
New R1 1 0 0 2 2 3
Thus; D-1 = 2 2 3
0 1 1
1 1 1
Exercise
1. Find the inverse of the following using the zero –first method;
3 2 3 3
C= D=
1 5 4 4
15
2 3
a13 = 3 and its cofactor c13 = (-1)1+3 = 11
-3 1
Similarly; C21= 7; C22= 11; C23= 5, C31= -7; C32= 7 and C33=7.
Adjoint of matrix A, Adj. (A) = the transpose of the cofactor matrix (Ct).
7 7 -7
Adj. (A) = Ct = -1 11 7
11 5 7
16
Matrix Applications
Solving System of Linear Equations
A system of linear equations can be solved by the following three methods using matrix
algebra:
a) Cramer’s rule ( the determinant method)
b) The inverse method
c) The Gauss- Jordan method
a) Cramer’s Rule:
This method sometimes called the determinant method; works according to this formula:
Xi = /Ai/; where xi = indicates the variables we want to solve for.
/A/ /Ai/= is the determinant obtained by putting the right-hand side of
the system in place of the column of coefficients of the variable
whose solution is needed; and
/A/ = is the determinant of the system.
y= 1 1 1 1
= 1/2
1 2 1 2
A 1 -1
1 1
ii) Given a system of equations:
a11x+ a12y+ a13z = b1
a21x+ a22y+ a23z = b2
a31 x+a32y+ a33z = b3
Expanded form:
a11 a12 a13 x b1
a21 a22 a23 . y = b2
a31 a32 a33 z b3
A X B
Then; the value of x is given by:
b1 a12 a13 a11 b1 a13
b2 a22 a23 a21 b2 a23
x= b3 a32 a33 ;y= a31 b3 a33
a11 a12 a13 a11 a12 a13
a21 a22 a23 a21 a22 a23
a31 a32 a33 a31 a32 a33
z= a11 a12 b1
a21 a22 b2
a31 a32 b3
a11 a22 a13
a21 a22 a23
a31 a32 a33
Exercise
1. Solve using Cramer’s rule:
2x + y – z = 0
x+y+z=0
y–z=1
18
b) The Inverse Method:
It is used to find the solution of linear equations when the number of equations is equal
to the number of variables (i.e. for square matrices only).
Consider the following system of linear equations:
a11x1+ a12x2+ a13x3 = b1
a21x1+ a22x2+ a23x3 = b2
a31x1 + a32x2+ a33x3 = b3
These equations can be expanded as:
a11 a12 a13 x1 b1
a21 a22 a23 . x2 = b2
a31 a32 a33 x3 b3
Matrix of coefficient column vector of column vector of
(A) Variables (x) constants (B)
Therefore, AX = B
If we multiply the above equation by A-1, we get (A-1A) (x) = A-1B
IX = A-1B, but A-1A = I; therefore; IX =X
Thus, X = A-1B
In general, in using the inverse method to find the solution of linear equations:
1st Find the inverse of the coefficient matrix.
2nd Multiply the inverse with the column vector of constants.
19
-2R1 + R2;
-2 R = -2 -4 0 -2
+
R2 = 2 3 1 0
New R2 0 -1 1 -2
Multiply R2 by -1;
-1(R2) = 0 1 -1 2
The resultant matrix is given by:
1 2 0 1
0 1 -1 2
-2R2 + R1;
-2R2 = 0 -2 2 -4
+
R1 = 1 2 0 1
New R1 1 0 2 -3
1 0 2 -3
0 1 -1 2
Therefore, X1 = 4 and X2 = 3.
Exercise
It applies the concept of row operations both on the coefficient matrix (A) and the column
vector of constants (B) in order to convert them to an identity matrix (I) and the solution
matrix (S) respectively.
That is, (A/B) row operations (I/S)
21
Solving Word Problems
Steps:
1. Represent the unknown quantities by letters.
2. Translate the quantities from the statement of the problem and form an algebraic
expression; then, set up an equation.
3. Solve the equations for the unknowns.
4. Check the findings as per the statement in the problem.
Example-1
A manufacturer produces two products p and q. Each unit of product p requires in its
production 20 units of raw material A and 10 units of raw material B whereas each unit
of product q requires 30 units of raw material A and 50 units of raw material B. There is
a limited supply of only 1200 units of raw material A and 950 units of raw material B.
How many units of P and q can be produced if the manufacturer is to exhaust the
supply of raw materials (to operate at full capacity).
Solution:
Step-1: Let x and y represent the number of units of product P and q to be produced
respectively at full capacity.
Step 2: Formulate the equations:
Raw material A: 20x+30y =1200 2x+3y =120
Raw material B: 10x+50y = 950 x+5y = 95
Step 3: Solve the equations:
Let us apply the Gaussian method;
Expanded form:
2 3 x = 120
1 5 . y 95
(A/B) (I/S)
22
2 3 120
1 5 95
1 5 95
2 3 120
-2R1+R2;
1 5 95
0 -7 -70
R2/-7;
1 5 95
0 1 10
-5R2+R1;
1 0 45
0 1 10
x = 45 x = 45 units
y 10 y = 10 units
23
Step -4: Cross- Checking
20x+30y =1200
20(45)+30(10) =1200
1200 =1200
10x+50y = 950
10(45)+50(10)=950
950 = 950
Example -2
Attendance records indicated that 1600 people attended a football game and the total
ticket receipt was 2800 birr. The admission price was 1.50 birr for students and 2.50
birr for others. Determine the number of students and non-students who attended
the game.
Solution:
Given: Attendants Total
Students Non-students receipt
Admission price ……. 1.50 birr 2.50 birr 2800 birr
Number of People - - 1600
Step -1: Let S and N represent the number of students and non – students who
attended the same respectively.
Step- 2: Develop the equations;
Number of people: S+N = 1600
Receipt : 1.50 S+ 2.50 N = 2800
1 1 . S = 1600
1.5 2.5 N 2800
A / B → I / S
1 1 1600
1 1 1600
0 1 400
-R2 + R1 ;
1 0 1200
0 1 400
S = 1200
N 400 Number of students(S) = 1200.
Number of non-students (N) = 400
Total = 1600
25