CH 2 Matrix
CH 2 Matrix
CH 2 Matrix
3x3
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.
2.2 Dimension 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 in to 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.
D. A diagonal matrix: is a square matrix where it’s 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.
6 0 0
E.g. Y = 2 0 Z= 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 matrixes): 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
Remark:
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.
6 13 3
9 8 4
The dimension of B is changed from 3x4 to 4x3.
3. Addison and subtraction of matrices: Two matrices A and B can be added or subtracted
if and only if they have the same order, which is the same number of rows and columns.
That is, the number of columns of matrix A is equal to the number of columns of matrix
B, and the number of rows of matrix A is equal to the number of rows of matrix B. Two
matrices of the same order are said to be conformable for addition and subtraction. The
sum and subtraction of two matrices of the same order is obtained by adding together or
subtracting corresponding elements of the two matrices.
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 → Cij = 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
A+B is not defined, since orders of A and B are not the same.
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.
There are two types of matrix multiplication: multiplication by a scalar and
multiplication by a matrix.
i. Scalar multiplication: Scalar is a real number; 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
8 1 14
=
15 3 32
3 0 5 (3x3)
Solved problems
1. Bonga Furniture Factory (3F) produces three types of executive chairs namely A, B and
C. The following matrix shows the sale of executive chairs in two different cities.
Executive chairs
A B C
C1 400 300 200
Cities
C2 300 200 100 (2x3)
If the cost of each chair (A, B and C) is Birr 1000, 2000 and 3000 respectively, and the
selling price is Birr 2500, 3000 and 4000 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
1,600,000
=
1,000,000
3 2 1 0 1 1 0 1
1 1 0 1 3 2 1 0
3rd: Multiply R1 by -3 and add the result to R2; means New R2 = R1 (-3) + R2
-3 R1 = -3 -3 0 -3
+
R2 = 3 2 1 0
0 -1 1 -3
The resulting matrix is given by:
1 1 0 1
0 -1 1 -3
4th: Simply add R2 entries to R1 entries; R2+R1
R2 = 0 -1 1 -3
+
R1 = 1 1 0 1
1 0 1 -2
The resulting matrix is given by:
1 0 1 -2
0 -1 1 -3
0 1 -1 3
Here we have seen that the original matrix is converted in to identity matrix and the
corresponding identity matrix to inverse matrix?
Thus; the inverse matrix A, denoted by A-1 is given as:
A-1 = 1 -2
-1 3
= 3 2 1 -2 1 0
. =
1 1 -1 3 0 1
(-1)R2 = 0 -1 -1 0 -1 0
+
R1 = 1 1 3/2 ½ 0 0
1 0 ½ ½ -1 0
The resultant matrix is given by:
1 0 ½ ½ -1 0
0 1 1 0 1 0
0 -4 -3 -2 0 1
4R2 = 0 4 4 0 4 0
+ 0 -4 -3 -2 0 1
R3 0 0 1 -2 4 1
1 0 ½ ½ -1 0
0 1 1 0 1 0
0 0 1 -2 4 1
6th → multiply R3 by -1/2 and add to R1 (-1/2 R3 + R1);
1 0 0 3/2 -3 -1/2
0 1 1 0 1 0
0 0 1 -2 4 1
7th → multiply R3 by -1 and add to R2 (-1R3+R2);
(-1) R3 = 0 0 -1 2 -4 -1
+
R2 = 0 1 1 0 1 0
0 1 0 2 -3 -1
The resultant matrix is green by:
1 0 0 3/2 -3 -1/2
0 1 0 2 -3 -1
0 0 1 -2 4 1