Nothing Special   »   [go: up one dir, main page]

CH 2 Matrix

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

UNIT TWO

MATRIX ALGEBRA AND ITS APPLICATIONS


2.1 Why we learn matrix?
There are three major reasons for learning matrix:
1. Matrices are used to handle large linear systems
2. Matrices are used to solve complex linear equations
3. Matrices are an effective means for summarizing voluminous business data.
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 line 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 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

Xm1 xm2 xmn (mxn)


Matrix X above has m rows and n columns or it is said to be a matrix of order (size) m x n
(read as m by n).
Example:

A= a11 a12 a13


a 21 a22 a 23
a 31 a 32 a33

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.

C. A square matrix: is a matrix with equal number of rows and columns.


1 4 3
E.g. D= 2 6 2 2 5
3 8 ; E= 8 6 9

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.

2.3 Matrix Operations and Properties


1. Matrix equality: two matrices are said to be equal if and only if they have the same
dimension and corresponding elements of each matrix are equal.
3 0 3 -4 3 0
E.g. A= B= C=
1 -4 1 0 1 -4
A ≠ B; A = C; B ≠ C.
2. Transpose of a matrix: If the rows and columns of a matrix are interchanged the new
matrix is known as the transpose of the original matrix. If the original matrix is denoted
'
by A, the transpose is denoted by A or At. Transposition means interchanging the rows or
columns of a given matrix. That is, the rows become columns and the columns become
rows.
E.g B= 3 5 6 9
0 11 13 8
6 8 3 4

The transpose of matrix B, denoted by B' or Bt is given as:


3 0 6
Bt = 5 11 8

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

A+B = -5+4 6+1 = -1 7

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

ii. Multiplication by a matrix: multiplication by a matrix can be performed if the


number of columns in the first matrix is equal to the number of rows in the second
matrix. In this type of multiplication, we always multiply each row of the first matrix
by each column of the second matrix and sum the resulting outcome.
E.g. 1 2 2 1 4
A= 3 4 B=
0 1 (3x2) 3 0 5 (2x3
Then, A x B = (1x2) + (2x3) (1x1) + (2x0) (1x4) + (2x5)

(3x2) + (4x3) (3x1) + (4x0) (3x4) + (4x5)

(0x2) + (1x3) (0x1) + (1x0) (0x4) + (1x5)

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

a) 400 300 200 1500 1000


q= p= V=
3000 2000
300 200 100
4000 3000
Total cost = (unit cost)* (Quantity)

= 400 300 200 1000


*
2000
300 200 100
3000

1,600,000

=
1,000,000

Total cost = Birr 1,600,000 + Birr 1,000,000 = Birr 2,600,000

b) Total profit = Total Revenue - Total Cost

Total Revenue = (price) *(quantity)

400 300 200 1500


= *.
3000
300 200 100
2,300,000 4000
=
1,450,000

Total Revenue = Birr 2,300,000 + Birr 1,450,000 = Birr 3,750,000

Profit = Birr 3,750,000 – Birr 2, 600,000


= Birr 1,150,000
2.4 Inverse of a Matrix
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.
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.
 Method of finding invers of the matrix
The most important methods to find inverse of a given matrix include
1. Gauss- Jordan Inversion method.
I. Gauss- Jordan Inversion Method
The Gauss- Jordan inversion method starts by writing the given matrix at the left and
the corresponding identity matrix next to it, at the right. Then, select and carryout row
operations that will convert the given matrix in to an identity matrix and apply the
same operations to the matrix at the right simultaneously. When the left or the given
matrix becomes an identity matrix, the matrix at the right will be the desired inverse
matrix.

i.e. A/I Apply Elementary Row Operation (ERO) I/A-1


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 matrixes 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

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

5th: Multiply R2 by -1;


(-1) (R2) = 0 1 -1 3
The resulting matrix is given by;
1 0 1 -2

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

Check! A.A-1 = A-1. A = I

= 3 2 1 -2 1 0

. =
1 1 -1 3 0 1

Example 2: Find the inverse of B = 2 2 3


0 1 1
4 0 3
Solution:
1st → write the given matrix at the left and the corresponding identity matrix at the
right.
2 2 3 1 0 0
B/I = 0 1 1 0 1 0
4 0 3 0 0 1
N.B: The corresponding identity matrix for a 3x3 square matrix is of dimension 3x3.
2nd → Divide R1 by 2 (or multiply R1 by ½) = New R1
R2/2 = 2/2 2/2 3/2 1/2 0/2 0/2
= 1 1 3/2 ½ 0 0

The resultant matrix is: 1 1 3/2 ½ 0 0


0 1 1 0 1 0
4 0 3 0 0 1

3rd → multiply R1 by -4 and add to R3 (-4R1 + R3) = New R3


-4R1 = -4 -4 -6 -2 0 0
+
R3 = 4 0 3 0 0 1
0 -4 -3 -2 0 1

The resultant matrix is: 1 1 3/2 ½ 0 0


0 1 1 0 1 0
0 -4 -6 -2 0 1

4th → multiply R2 by -1 and add to R1 (-1R2+R1) =New R1

(-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

5th → multiply R2 by 4 and add to R3 (4R2 +R3) = New R3

4R2 = 0 4 4 0 4 0
+ 0 -4 -3 -2 0 1
R3 0 0 1 -2 4 1

The resultant matrix is given by:

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/2 R3 = 0 0 -1/2 1 -2 -1/2


+
R1 = 1 0 ½ ½ -1 0
1 0 0 3/2 -3 -1/2
The resultant matrix is green by:

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

Thus; B-1 = 3/2 -3 -1/2


2 -3 -1
-2 4 1

You might also like