Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

ECON 1003 Mathematics for Social Sciences I

UNIT SIX

MATRICES

A matrix is a rectangular array of scalars of the form

 a11 a12 a1n 


 
a a22 a2 n 
A   21
 
 
 am1 am 2 amn 

The dimension m  n (read “m by n” is simply the rows and columns).

This type of array can be used to display and record data where there are round or square
brackets to denote the matrix.

Definition: A rectangular array of numbers consisting of m horizontal rows and n


vertical columns is called an m  n matrix or a matrix of order m  n.

If the matrix has just one row, it is called a row vector.

If the matrix has only one column, it is called a column vector.

The numbers in a matrix are called entries, elements or scalars.

It is conventional to denote matrices by capital letters, (for example, A) and its elements by
combinations of lower case letters and subscripts that indicate the location of the elements in the
matrix.

Hence we have the notation aij  where i = 1, 2, 3 represent the rows and j = 1, 2, the columns.

Hence the matrix:

 a11 a12 
A   a21 a22 
 a31 a32 

The matrix A has order 3  2.

112
ECON 1003 Mathematics for Social Sciences I

Properties of Matrices

 Two matrices A =  aij  m  n and B =  bij  m  n are equal iff aij  bij for all i = 1, 2, . . .m
and j = 1, 2, . . .n.

 The m  n matrix in which each element is zero is the identity for addition for all m  n
matrices. It is denoted by 0 and is called the zero matrix.

 A matrix with an equal number of rows and columns is said to be a square matrix.

 The transpose of a matrix A is the rotation of the matrix 90 degrees so that the rows and
columns are interchanged and is denoted as AT (AT, At, A1).

Example 7.0:

 3 1
 3 2 1  
Given A    then AT   2 4  .
 1 4 5   1 5
 

Note: For matrices A and B conformable for addition and multiplication then:

(i) A 
T T
A
 A  B   AT  BT
T
(ii)
 KA  KAT
T
(iii)
 AB   BT AT
T
(iv)

If AT=A, then A is said to be a symmetric matrix.

Example 7.1:

 2 3  2 3
A  and AT   .
 3 1  3 1

113
ECON 1003 Mathematics for Social Sciences I

Addition and Subtraction


Two matrices are conformable for addition (subtraction) if they have the identical number of
rows and columns (or the orders are the same). We add/subtract by adding/subtracting elements
in like locations.

Example 7.2:

 1 2  3 2 
Given A   2 3  and B   0 1 . Evaluate A – B.
 
 1 0   4 3 
   

Solution:

 1 2   3 2 
   
A  B   2 3    0 1
 1 0   4 3 
   

 4 0
 
  2 4
 3 3 
 

Note: If A, B and C are conformable for addition then:

(i) A B  B  A Commutative Law


(ii) A  ( B  C )  ( A  B)  C Associative Law
(iii)  ( A  B)   A   B for   R
(iv)     A   A   A for  ,   R
(v) A 0  0 A  A Identity Law
(vi) A A  0

Multiplication of a Matrix by a Scalar


Given a matrix A = (aij) and a scalar k, the scalar multiple of A is denoted by kA=k(aij) = (kaij).
That is, we multiply each element in the matrix by the scalar k.

114
ECON 1003 Mathematics for Social Sciences I

Example 7.3:

 2 3 0 1
Given A    and B   4 1  . Evaluate (i) 3A (ii) 2A – 3B.
 1 2   

Solution:

 2 3
(i) 3A  3 
 1 2 

6 9
 
 3 6 

 2 3   0 1
(ii) 2 A  3B  2    3 
 1 2   4 1

 4 6   0 3
   
 2 4  12 3 

 4 3
 
 10 1

Multiplication of Matrices
Two matrices A and B are conformable if A has as many columns as B has rows when finding the
product matrix AB.

If A is an m  p matrix and B is a p  n matrix then the product C = AB is an m  n matrix in


which the elements Cij of C is defined by:

Cij  a b
k 1
ik kj i  1, 2, m j  1, 2, n

In the product matrix AB, A is known as the lead matrix and B as the lag matrix.

115
ECON 1003 Mathematics for Social Sciences I

Note: Conformability can be checked by AB = A3x2 B2x2 = AB32 result in the example
below.

Example 7.4:

 2 2 
 3 0
Find AB if A   1 4  and B   .
 3 6   1 5 
 

Solution:

AB is found by finding the row  column product as follows:

 2 2 
  3 0
AB   1 4   
 3 6   1 5 
 

 2(3)  (2)(1) 2(0)  (2)(5) 


 
 1(3)  4(1) 1(0)  4(5) 
 3(3)  6(1) 3(0)  6(5) 

 8 10 
 
AB   1 20 
 3 30 
 

In general AB  BA .

Given matrices A, B, and C when the sums and product exist, then

(i) A(BC) = (AB) C Associative Law


(ii) A(B + C) = AB + AC Left Distributive Law
(iii) (A+B) C = AC + BC Right Distributive Law

116
ECON 1003 Mathematics for Social Sciences I

The Identity matrix In is defined by IA = AI = A for a matrix A. The identity matrix of order n is
denoted In is also known as the unit matrix of order n is given by:

1 0 0 0 0 0
 
0 1 0 0 0 0
In   0 0 1 0 0 0
 
 
0 1 nn
 0 0 0

1 0 0
1 0  
Hence I 2    and I 3   0 1 0  .
0 1 0 0 1
 

A scalar matrix is a scalar multiple of the unit matrix, and commutes with every matrix of the
same order.

Example 7.5:

1 0  3 0
3  
 0 1  0 3

These matrices form a subset of a special class of square matrices called diagonal matrices which
are defined as A = (aij)n  n is a diagonal matrix of order n iff aij = 0 for all i  j (that is elements
which are not on the leading or principal diagonal are zero. A is sometimes written
diag(a11, a22, . . . ann).

Example of a diagonal matrix:

 2 0 0
 
A = diag (2, 8, -1) OR A   0 8 0 .
 0 0 1
 

If A and B are diagonal matrices of order n, then A + B and AB are diagonal matrices of order n.

117
ECON 1003 Mathematics for Social Sciences I

Example 7.6:

 2 0 1 0
A  and B    . Find A + B and AB.
 0 4 0 2

Solution:

 2 0 1 0  3 0
A B     
 0 4  0 2  0 6

 2 0  1 0   2 0 
AB     .
 0 4  0 2   0 8 

The Determinant
The determinant of a matrix is only defined for square matrices.

The determinant is a real number calculated from the elements of any square matrix.

The determinant of a matrix A is denoted by det A or A .

Determinant of Matrix of Order 1

If the matrix has order 1  1 then A is of the form  a11  since there is only one element in the
matrix. The determinant A  a11 .

Determinant of 2  2 Matrices

If the matrix A has order 2  2, its determinant is calculated by substracting the product of the
elements on the non-leading diagonal from the product of the elements on the leading (main)
diagonal.

 a11 a12 
For example if A    then A  a11a22  a21a12 .
 a21 a22 

118
ECON 1003 Mathematics for Social Sciences I

Example 7.7:

 2 1 
Given A    find det A.
 4 3

Solution:

det A = 2(3) – 4(-1)


=6+4
= 10

Note: It is important to pay attention to the signs.

Determinant of 3  3 Matrices

If the matrix is of order 3  3, we need to introduce the concepts, minor and cofactor in order to
evaluate the determinant by the co-factor method.

 a11 a12 a13 


Given A   a21 a22 a23 

a a33 
 31 a32

Definition: For each element of this matrix, we can compute a 2  2 matrix (Mij) found
by deleting the i’th row and j’th column. Then the determinant of Mij is
called the minor of aij.

Note: i represents the row of the element and j the column of the element.

Example 7.8:

a a23 
M 11   22
 a32 a33 

Hence the minor of a11 is det M11 .

119
ECON 1003 Mathematics for Social Sciences I

Example 7.9:

a a13 
M 21   12
 a32 a33 

Hence the minor of a21 is det M 21 .

Each element has a corresponding cofactor. The cofactor of aij is denoted by Aij and is defined
as:

Aij  (1)i  j Mij

and is known as a signed minor.

Note: Attention should be paid to the signs.

Example 7.10:

 2 0 1
Let A   4 1 5 . Evaluate the corresponding cofactors: (i) C11 (ii) C21 (iii) C23.
 
 2 3 1

Solution:

1 5
(i) C11  (1)2 M11  (1)2  (1)(14)  14 .
3 1

0 1
(ii) C21  (1)3 M 21  (1)3  (1)(3)  3 .
3 1

2 0
(iii) C23  (1)5 M 23  (1)5  (1)(6)  6 .
2 3

120
ECON 1003 Mathematics for Social Sciences I

Finding the Determinant by Co-Factor Method

The determinant of a matrix of order 3 can be calculated using the following steps:

(i) select any row or column of the matrix

(ii) calculate the product of each element in the selected row or column with its
corresponding cofactor

(iii) take the sum of all three products which gives the determinant of the matrix.

Using the matrix in Example 7.10.

Evaluate the det A.

Using row 1 as the selected row:

 1 5  4 5  4 1
det A  2    0   (1)  
 3 1  2 1  2 3

= 2 (1 – 15) – 0 – 1 (12 – 2)

= 2 (– 14) – 1 (10)

= – 28 – 10

= – 38

The method known as the rule of Sarrus (only valid for matrices of order 3) can also be used to
evaluate the determinant.

Evaluating the determinant of:

 a11 a12 a13 


 
A   a21 a22 a23 
a a33 
 31 a32

121
ECON 1003 Mathematics for Social Sciences I

To evaluate the det A we write columns 1, 2 next to the matrix:

  
a a a13 a11 a12
A  11 12
a21 a22 a23 a21 a22
a31 a32 a33 a31 a32

Then evaluate the diagonals:

det A  a11a22 a33  a12 a23a31  a13a21a32  a31a22 a13  a32 a23a11  a33a21a12

det A in Example 7.10 equals:

2 0 1 2 0
4 1 5 4 1
2 3 12 3

det A = (2)(1)(1) + (0)(5)(2) + (–1)(4)(3) – 2(1)(–)– (3)(5)(2) – (1)(4)(0)

= 2 + 0 – 12 + 2 – 30 – 0

= – 38

Properties of the Determinant

(i) det A = det AT.

(ii) If A has a row or column of all zeros then the determinant or A is zero.

(iii) If A has two identical rows or columns then the determinant of A is zero.

(iv) If A is a diagonal matrix, its determinant is the product of the elements on the leading
diagonal.

(v) If one row in A is a scalar multiple of another row, the determinant of A is zero.

122
ECON 1003 Mathematics for Social Sciences I

(vi) Let B be the matrix obtained from the matrix A by:

(a) multiplying a row (column) of A by a scalar k, then det B = k det A.

(b) interchanging two rows (columns) of A then we have det B = – det A.

(c) adding a multiple of a row (column) of A to another row (column) then det B =
det A.

Inverse of a Matrix

Definition: The inverse of a matrix A is the matrix A-1 such that A-1A = AA-1 = In.

Definition: A square matrix A for which A  0 is said to be non-singular, or invertible.


If A  0 , then A is singular and the inverse does not exist.

1
Theorem: If A  0 then A1  adj A .
A

Definition: Let A be an n  n matrix. The adjoint of A is denoted by adj A and is defined


by its cofactor and transposing the resulting matrix.

 A11 A12 A1n 


A A22 A2 n 
adj A   21
 
 
 An1 An 2 Ann 

Inverse of a 2  2 Matrix

 a11 a12  1 1 a a12 


Given A   1
 . Then A   adjA   22
a11 
.
 a21 a22  det A A  a21

123
ECON 1003 Mathematics for Social Sciences I

Example 7.11:

 1 3 
Given A   -1
 . Find A .
 0 2 

Solution:

det A = – 1(2) – 0(3) = –2

 1 3 
11  2 3   2.
A    or
2  0 1  0 1 
 2

Inverse of a 3  3 Matrix

 a11 a12 a13 


Given A   a21 a22  1 1
a23  . Then A1   adjA   cofactor of AT .
a det A det A
 31 a32 a33 

Example 7.12:

 1 1 1
Find the inverse of the matrix A   1 2 3  .
2 4 7
 

Solution:

2 3  1 3  1 2
det A  1   1   1 
 4 7   2 7   2 4

= 1(14 – 12 ) – 1(7 – 6) + 1(4 – 4)

=2–1

=1

Since det A = 1; A-1 exists.

124
ECON 1003 Mathematics for Social Sciences I

   
 
2 3 1 3 1 2
4 7 2 7 2 4
 
    

adj A = 1 1 1 1 1 1
 
4 7 2 7 2 4
 
    
1 1 1 1 1 1
 
 2 3 1 3 1 2 T

 2 1 0   2 3 1
  
adj A =  3 5 2    1 5 2 
 1 2 1T  0 2 1

1
Hence A1   adj A 
det A

 2 3 1  2 3 1
1   
  1 5 2    1 5 2 
1
 0 2 1  0 2 1

Inverse matrices are used to solve systems of linear equations and to solve matrix equations.

Solving Matrix Equations


Given matrices A, B, and C conformable for addition and multiplication then to find matrix D
such that AD – B = C, we can apply the matrix of equations to give:

AD = B + C

125
ECON 1003 Mathematics for Social Sciences I

Premultiplying both sides by A-1 gives:

A-1AD = A-1(B + C)

Hence D = A-1 (B + C).

Example 7.13:

 2 1  1 1
If A    and B    . Find C such that AC = B.
 0 3 1 2 

Solution:

Given AC = B. Using A-1 gives:

A-1AC = A-1B
C = A-1B

1
A-1 =  adj A 
det A

det A = 2(3) – 0(-1) = 6

1  3 1
A-1 =  
6 0 2

C = A-1B

1  3 11 1
Hence C =    
6  0 2 1 2 

4 1 
1  4 1  6  6 
  
6  2 4  1 2 
 3 3

126
ECON 1003 Mathematics for Social Sciences I

Solving Simultaneous Equations


Given a system of liner equations:

a11 x1  a12 x2   a1n xn  b1


a21 x1  a22 x2   a2 n xn  b2

an1 x1  an 2 x2   ann xn  bn

where coefficients aij and b1, b2 . . . bn are scalars.

This system of equations can be written in matrix form as:

 a11 a12 a1n  x1   b1 


    
 a21 a22 a2 n  x2   b2 

    
    
 an1 an 2 ann  xn   bn 

or more concisely as:

Ax  b

where

 x1   b1 
   
 x2  b
A   aij nn x and b   2 
   
   
 xn   bn 

A is called the matrix of coefficients.

If A-1 exists, then premultiplying by A-1 gives the solution:

Ax  b
A1 Ax  A1b
x  A1b

since A-1A = In and I x = x .

127
ECON 1003 Mathematics for Social Sciences I

This gives rise to the theorem which states that if a system of equations can be written in the
form Ax  b , and if A-1 exists, then the solution x is given by x = A-1b.

Example 7.14:

Solve the system of equations using the inverse method:

x y z  6
x  2 y  3z  10
2 x  4 y  7 z  21

Solution:

 1 1 1 x   6 
In matrix form Ax  b gives  1 2 3    
 y    10 
 2 4 7  z   21
    

 1 1 1
 
A   1 2 3
2 4 7
 

 2 3 1
 
det A = 1 and A =  1 5 2 
-1
(from Example 7.12)
 0 2 1

 x
Hence x   y   A1b
 z
 

 2 3 1 6 
  
  1 5 2  10 
 0 2 1 
  21

 12 30 21  3 
   
  6 50 42    2 
 0 20 21  1
   

128
ECON 1003 Mathematics for Social Sciences I

Solution: x = 3, y = 2, z = 1.

Cramer’s Rule can also be used to solve systems of equations. Cramer’s Rule allows us to find
the value of each variable independent of the others. The method makes significant use of
determinants.

Theorem: Given the system of equations Ax  b , let Ai denote the determinant obtained
by replacing the i’th column of A by b. If det A  0 then:

A1 A An
x1  , x2  2 , xn  .
A A A

This is known as Cramer’s Rule.

Example 7.15:

Solve the system of equations by Cramer’s Rule:

2x  3y  z  1
3x  5 y  2 z  8
x  2 y  3z  1

Solution:

In matrix form:

 2 3 1  x   1
    
 3 5 2  y    8
 1 2 3   z   1
    

form A x = b

5 2 3 2 3 5
det A = 2 3 1
2 3 1 3 1 2

= 2(–15 + 4) – 3(–9 –2) – 1(–6 –5)

= 2(–11) – 3(–11) – 1(–11) = 22

129
ECON 1003 Mathematics for Social Sciences I

To find x, evaluate A1 :

1 3 1
8 5 2
1 2 3

det A = 1(–15 +4) – 3(–24+2) –1(–16+5)

= –11 + 66 + 11 = 66

A1 66
Hence x    3.
A 22

For y, evaluate A2 :

2 1 1
3 8 2
1 1 3

det A = –22

A2 22
Hence y    1 .
A 22

For z, evaluate A3 :

2 3 1
3 5 8
1 2 1

det A3 = 44

A3 44
Hence z   2.
A 22

130
ECON 1003 Mathematics for Social Sciences I

Gauss-Jordan Elimination Process


The process of reducing a system of vectors to identity form by elementary row transformation
and the corresponding operations for systems of equations is known as Gauss-Jordan elimination
process.

In this process we can solve a system of equations and find the inverse of A by using elementary
row operations.

Consider the system of equations:

x y z  6
x  2 y  3z  10
2 x  4 y  7 z  21

This can be written in the form


A x = Inb

 1 1 1 x   1 0 0  6 
     
 1 2 3  y    0 1 0  10 
 2 4 7  z   0 0 1 21
     

In using the Gauss-Jordan process A, I and b are placed in augmented form below:

1 1 1 1 0 0 6
 
1 2 3 0 1 0 10 
 2 4 7 0 0 1 21
A I3 b

By using elementary row operations we must get the identity matrix where we have A and the
new matrix in the place of I3 would be the inverse of A. The new column b would be the solution
to x, y and z:

 1 1 1 1 0 0 6
 
R2  R1 0 1 2 1 1 0 4 
R3  2 R1 0 2 5 2 0 1 9 

131
ECON 1003 Mathematics for Social Sciences I

R1  R2  1 0 1 2 1 0 2 
 
0 1 2 1 1 0 4 
R3  2 R2 0 0 1 0 2 1 1

Row equivalent R1  R3  1 0 0 2 3 1 3
 
 R2  2 R3 0 1 0 1 5 2 2 
0 0 1 0 2 1 1
I3 A-1 solution

 2 3 1

Hence A   1 5 2 
1

 0 2 1

and

x=3
y=2
z = 1.

This can be applied to general systems of equations of the form Ax  b .

Example 7.16:

1 0  1 1
(a) If A    and B 
 2  2  2 0

Find the matrix C so that AC=B.

 1 3
 2 1 3  
(b) Given A    and C  1 0
0 1 4   0 2 

Evaluate 2 AT  C

132
ECON 1003 Mathematics for Social Sciences I

Solution:

(a)

AC  B
A1 AC  A1 B
C  A1 B

det A  1(2)  (0)(2)  2

1  2 0
A1   
2  2 1

1  2 0  1 1  1 2  2
C     
2  2 1  2 0  2  4  2

 1 1
C  
 2 1

(b)
 2 0   1 3
   
2 AT  C  2  1 1  1 0
 3 4   0 2 

 4 0   1 3  3 3
     
  2 2   1 0    1 2
 6 8   0 2   6 10 

Example 7.17:

 2 3 1 4
Given A    and B 
 3 1  0  2

If A  C  B Find C

133
ECON 1003 Mathematics for Social Sciences I

Solution:

AC  B
Hence A  B  C
or C  A B
 2 3  1 4   3  1 
C=    
 3 1  0  2   3 3 

Example 7.18:

Write the system of linear equations below in matrix form

2 x  3 y  z  1
(i) 2 x  4 y  2 z  6
x  y  3z  1

(ii) Hence use any matrix method to solve the system of equation in (i)

Solution:

 2  3 1  x    1
    
 2 4 2  y    6
 1 1  3    1 
(i)   z  
A x  b

det A  22

134
ECON 1003 Mathematics for Social Sciences I

(b) Using Gamers’ Rule Method

1  3 1
44
x 6 4 2  hence x  2
22
1 1 3
det A

2 1 1
44
y  2 6 2  2 y2
22
1 1 3
det A

2  3 1
22
z  2 4 6  1 z 1
22
1 1 1
det A

By Inverse Method

135
ECON 1003 Mathematics for Social Sciences I

det A  22

    
 
4 2 2 2 2 4 
1  3 1 3 1 1 
 
 
 
    
adjA   3 1 2 1 2 3 
 
 1 3 1 3 1 1 
 
 
    
 
 3 1 2 1 2 3 
 4 2 2 2 2 4 
 T

 14  4  6   14  8  10 
   
adj    8  7  5     4  7  6 
 10  6 2    6  5 2 
 T 

 14  8  10 
1 1  
A   4 7 6 
22 
 6 5 2 

Hence

x  14  8  10  1 
  1   
 y    22   4  7  6  6 
z   6 5 2  
    1 

14  48  10   44   2 
1   1    
   4  42  6     44    2 
22   22    
 6  30  2   22   1

x  2, y  2, z  1

136
ECON 1003 Mathematics for Social Sciences I

Additional Practice Questions

 2 3
 2 0 1
(1) Given A   1 0

B 
 1 2   1 1 0 
 
 2 3
and C  
1  4 

Evaluate the following where possible

(i) A  B

(ii) 2 B  AT

(iii) 3 AT  2 B

(iv) AB

(v) BT C

(vi) BA

 1 2  0 2
(2) Let A    and B 
 3 1   1 3

If AC  B, find the matrix C.

 4  1  3 4
(3) Given A    B 
 1 3  2 6

Find A  2 BAT

137
ECON 1003 Mathematics for Social Sciences I

(4) Write the system of linear equations in matrix form

x  2y  z  5
2x  y  2z  3
x  y  1

Hence solve by any matrix methods.

138

You might also like