0% found this document useful (0 votes)
29 views47 pages

06 (A) Linear Algebra (Row Operation) SC

Chapter 6(a) of MT1186 covers Linear Algebra, focusing on matrices, their algebra, and solutions to systems of linear equations. Key topics include matrix operations, determinants, Cramer's rule, and the inverse of matrices. The chapter aims to introduce vectors and matrices, solve linear equations, and diagonalize matrices using eigenvalues and eigenvectors.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views47 pages

06 (A) Linear Algebra (Row Operation) SC

Chapter 6(a) of MT1186 covers Linear Algebra, focusing on matrices, their algebra, and solutions to systems of linear equations. Key topics include matrix operations, determinants, Cramer's rule, and the inverse of matrices. The chapter aims to introduce vectors and matrices, solve linear equations, and diagonalize matrices using eigenvalues and eigenvectors.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

MT1186 Mathematical Methods

Chapter 6(a): Linear Algebra


(Solutions to systems of linear equations)

Octavius Yap
[email protected]
Chapter 6(a): Linear Algebra 1

Contents
1 Introduction 4

2 Matrices 5

3 Algebra of matrices 5
3.1 Addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 Subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3 Scalar multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.4 Matrix multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.4.1 Method to find the matrix product . . . . . . . . . . . . . . . 7
3.5 Powers of a square matrix . . . . . . . . . . . . . . . . . . . . . . . . 8
3.6 Equal matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.7 Zero matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.8 Identity matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.9 Diagonal matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.10 Transpose of a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.11 Further properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

4 System of linear equations 10


4.1 Gauss-Jordan method of row reduction . . . . . . . . . . . . . . . . . 12
4.1.1 Steps of Gaussian elimination method . . . . . . . . . . . . . . 12
4.1.2 Row operations . . . . . . . . . . . . . . . . . . . . . . . . . . 13

5 Determinants 17
5.1 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

6 Cramer’s rule for solving systems of linear equations 22


6.1 2-variable equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6.2 3-variable equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

7 Inverse of a matrix 28
7.1 Matrix inverse of 2 × 2 matrix . . . . . . . . . . . . . . . . . . . . . . 28
7.2 Matrix inverse of 3 × 3 matrix . . . . . . . . . . . . . . . . . . . . . . 29

8 Using inverse matrix to solve system of linear equations 34

9 Solutions of a linear system 37

10 Tutorial questions 44

11 Answers to Tutorial questions 47

SIM Global Education Page 2 of 47


Chapter 6(a): Linear Algebra 1

Essential reading, Aims and Objectives


Essential reading
(i) Binmore and Davies (2002) Sections 1.1–1.5.

(ii) Anthony and Biggs (1996) parts of Chapters 14, 15, 16, 17, 18, 19 and 20

Further reading
(i) Simon and Blume (1994) parts of Chapters 6, 7, 8, 9, 10 and 23

(ii) Adams and Essex (2010) section 10.7

Aims and objectives


The objectives of this chapter are as follows.

(i) To introduce vectors and matrices

(ii) To see how to find determinants and inverse matrices

(iii) To see how to solve systems of linear equations.

(iv) To see how to diagonalise a matrix using its eigenvalues and eigenvectors

SIM Global Education Page 3 of 47


Chapter 6(a): Linear Algebra 1

1 Introduction
Definition 1.1. A vector is an ordered list of numbers.

Each vector is enclosed in brackets. The numbers in each vectors are called entries
(or components).

Given a vector, we says that its dimension is n if it contains n numbers and, as


such, an n-dimensional vector would contain n numbers x1 , x2 , . . . , xn in that order
can could be
 
x1
 x2 
(A) a column vector  .. , or
 
.
xn

(B) a row vector x1 x2 · · · xn .

We will mostly be dealing with column vectors.

Note:

(i) we denote xi , 1 ≤ i ≤ n as the i-th component (or entry) of a n-dimensional


vector x

(ii) Two vectors x and y are equal, denoted x = y if and only if xi = yi for all
1 ≤ i ≤ n.

(iii) Two vectors 


of the
 same dimension
  can be added or subtracted component-
x1 y1
wise. If x = x2 and y = y2 , then
  
x3 y3
     
x1 y1 x1 ± y 1
x ± y = x2  ± y2  = x2 ± y2 
x3 y3 x3 ± y 3

(iv) A scalar is a purely numerical quantity with a unit. Given a scalar α, we can
multiply a vector x by the scalr α to obtain a new vector, denoted by αx, by
multiplying every component of the vector by the scalar i.e.
   
x1 αx1
αx = α x2  = αx2 
x3 αx3

We keep this section brief to focus on the section of matrices.

SIM Global Education Page 4 of 47


Chapter 6(a): Linear Algebra 1

2 Matrices
Definition 2.1. A matrix is a rectangular array of numbers arranged in rows and
columns.
 
1 2 3
For example,
−1 −3 2
Note:

(i) Matrices are denoted by capital letters A, B, X, Y etc

(ii) The numbers forming a matrix are called the entries of the matrix.

(iii) A matrix having m rows and n columns is called a m × n matrix.

(iv) The order ofa matrix is 


also called the dimension or size of the matrix. The
1 2 3
matrix A = is a 2 × 3 matrix.
−1 −3 2

(v) A matrix in which the number of rows is the same as the number of columns
is called a square matrix.
 
3 7
(a) B = is a second order square matrix.
0 2
 
2 3 6
(b) C = 3 4 5 is a third order square matrix.
6 5 9

3 Algebra of matrices
If two matrices are of the same order, then we can do addition and subtraction of
those matrices.

3.1 Addition
To add two matrices, add the elements in the corresponding places

Example 1   
1 2 3 0
Let A = 3 5  and B = −1 −2, then
0 −2 4 8
     
1 2 3 0 4 2
A + B = 3 5  + −1 −2 = 2 3 .
0 −2 4 8 4 6

SIM Global Education Page 5 of 47


Chapter 6(a): Linear Algebra 1

3.2 Subtraction
To subtract a matrix B from a matrix A, subtract the elements of B from the
corresponding elements of A.

Example 2   
5 7 3 2 3 −6
Let A = and B = , then
1 2 4 4 1 3
     
5 7 3 2 3 −6 3 4 9
A−B= − = .
1 2 4 4 1 3 −3 1 1

3.3 Scalar multiplication


If A is a matrix and k is a scalar (i.e. a real constant), then the product kA is the
resultant matrix obtained by multiplying every element of A by the scalar k.

Example 3      
1 3 1 3 3 6
Suppose A = , then 3A = 3 =
2 4 2 4 6 12

3.4 Matrix multiplication


Given two matrices A and B, the matrix product AB will exist only if

the number of columns first matrix A=the number of rows of the second matrix B.

Example 4
Suppose A is a 2 × 3 matrix and B is a 3 × 4 matrix. Then AB exists and AB will
be a 2 × 4 matrix.

In general, matrix multiplication is not commutative i.e. AB 6= BA


Using example 4, BA does not exist because

number of columns in the first matrix B = 4


and number of columns in the second matrix A = 2

and they are not equal.

We can pre- or post-multiply one matrix by another matrix.

(1) In the product AB, the matrix A pre-multiplies matrix B.

(2) In the product BC, the matrix C post-multiplies matrix B.

SIM Global Education Page 6 of 47


Chapter 6(a): Linear Algebra 1

3.4.1 Method to find the matrix product


   
1 2 2 0 1
Suppose A = and B = .
0 3 3 1 2
A is a 2 × 2 matrix and B is a 2 × 3 matrix.

To find AB,

(1) Multiply the elements of the first row of A by the corresponding elements of the
first column of B and add the products and write the resultant sum of products
in the first column place of the matrix AB.

(2) Multiply the elements of the first row of A by the corresponding elements of
the second column of B and add the products and write the resultant sum of
products in the second column place of the matrix AB.

(3) Multiply the elements of the first row of A by the corresponding elements of
the third column of B and add the products and write the resultant sum of
products in the third column place of the matrix AB.

(4) Similarly, multiply the second row of A by the first, second and third columns
of B and write the resultant sums of products in the second row first, second
and third column places respectively of AB.

Example 5
The matrix AB is as follows
  
1 2 2 0 1
AB =
0 3 3 1 2
 
(1 × 2) + (2 × 3) (1 × 0) + (2 × 1) (1 × 1) + (2 × 2)
=
(0 × 2) + (3 × 3) (0 × 0) + (3 × 1) (0 × 1) + (3 × 2)
 
8 2 5
=
9 3 6

SIM Global Education Page 7 of 47


Chapter 6(a): Linear Algebra 1

3.5 Powers of a square matrix


If A is a square matrix, then

A2 = AA and
A3 = A(A)2 = (A)2 A

Example 6  
2 −1
Suppose A =
1 3

A2 = AA
  
2 −1 2 −1
=
1 3 1 3
 
(2 × 2) + (−1 × 1) (2 × −1) + (−1 × 3)
=
(1 × 2) + (3 × 1) (1 × −1) + (3 × 3)
 
3 −5
=
5 8

3.6 Equal matrix


Two matrices A and B are equal i.e. A = B on if they are of the same order and the
elements in the corresponding places are exactly the same.

Example 7    
1 2 a b
Suppose A = and B = and if A = B,
3 4 c d
then
a = 1 , b = 2 , c = 3 and d = 4.

3.7 Zero matrix


A matrix in which all the elements are zeroes is called a zero matrix and is denoted
by the symbol 0. The properties of a zero matrix are

(1) A + 0 = A

(2) A0 = 0A = 0

for any matrix A, provided the conditions for addition and multiplication are satis-
fied.

SIM Global Education Page 8 of 47


Chapter 6(a): Linear Algebra 1

3.8 Identity matrix


A square matrix in which all the elements in the main diagonal, (i.e. the diagonal
from the left top to the right bottom) are equal to 1 and all other elements are equal
to zero is called an identity matrix and is denoted by the symbol I. For example
 
1 0
(i) is the second order identity matrix.
0 1
 
0 0 1
(ii) 0 1 0 is the third order identity matrix.
0 0 1
The property of an identity matrix: AI = IA = A, provided the condition of multi-
plication is satisfied.

3.9 Diagonal matrix


A square matrix in which all the elements which are not in the main diagonal are
zero is called a diagonal matrix. For example
   
  2 0 0   4 0 0
1 0 5 0
, 0 −3 0 ,  ,  0 −7 0 .
0 2 0 8
0 0 −5 0 0 1

3.10 Transpose of a matrix


Given a matrix A, the transpose of A is the matrix obtained by exchanging the rows
and columns of A. Transpose of A is denoted by the symbol AT . For example, if
 
1 2  
T 1 0 4
A = 0 3 , then A = .
2 3 5
4 5

Notice that A is a 3 × 2 matrix and AT is a 2 × 3 matrix.

3.11 Further properties


(1) A + B = B + A

(2) A + (B + C) = (A + B) + C

(3) ABC = (AB)C = A(BC)

(4) A(B + C) = AvB + AC

(5) (kA)B = k(AB)

(6) A(kB) = k(AB)

SIM Global Education Page 9 of 47


Chapter 6(a): Linear Algebra 1

4 System of linear equations


A system of m linear equations in n variables, say x1 , x2 , . . . , xn , of the form

a1,1 x1 + a1,2 x2 + · · · + a1,n x = b1


a2,1 x1 + a2,2 x2 + · · · + a2,n x = b2
.. ..
. .
am,1 x1 + am,2 x2 + · · · + am,n xn = bn

can be expressed in matrix form as follows:

Ax = b

where
 
a1,1 a1,2 · · · a1,n
 a2,1 a2,2 · · · a2,n 
A =  .. ..  is the coefficient matrix
 
.. ...
 . . . 
am,1 am,2 · · · am,n
 
x1
 x2 
x =  ..  is the column vector of variables
 
.
xn
 
b1
 b2 
b =  ..  the column vector of constants on the right-hand side.
 
.
bn

SIM Global Education Page 10 of 47


Chapter 6(a): Linear Algebra 1

Example 8
Write the following system of linear equations in matrix form:
(a)

2x + 3y = 3
x − 3y = 6

Solution:    
2 3 x 3
1 −3 y 6

(b)

3x + y − 2z = 3
4x − 5z = −2
8x − 3y + 4z = 17

(c)

x − 2y − z = 4
−2x − 3y + 5z = −9
3x + y + z = 2

(d)

a + b + c = −5
2a + b − c = −1
14a + 9b + (6 ln 2)c = 6 ln 2 − 24

SIM Global Education Page 11 of 47


Chapter 6(a): Linear Algebra 1

4.1 Gauss-Jordan method of row reduction


Suppose we have a system of linear equations in three variables as follows:

a11 x + a12 y + a13 z = b1


a21 x + a22 y + a23 z = b2
a31 x + a32 y + a33 z = b3

where a11 , a12 , a13 , . . . , a33 , b1 , b2 and b3 are constants.

4.1.1 Steps of Gaussian elimination method


(1) Write the system of of equations in matrix form.
    
a11 a12 a13 x b1
a21 a22 a23  y  = b2 
a31 a32 a33 z b2

(2) Write the augmented matrix that corresponds to the system of equations. For
the above system, the augmented matrix is:
 
a11 a12 a13 b1
a21 a22 a23 b2 
a31 a32 a33 b3

(3) Use row operations to transform the first column so that the first element
is 1 and the other elements are zero.

(4) Use row operations to transform the second column so that the second ele-
ment is 1 and the element below it are zero.

(5) Use row operations to transform the third column so that the third element
is 1 .

(6) The reduced augmented matrix will be of the form


 
1 ∗ ∗ ∗
0 1 ∗ ∗
0 0 1 ∗

which is called the row-echolon form. Notice in the row-echolon form, all the
elements in the main diagonal are equal to 1 and there is a triangle of zeroes
below the main diagonal.

(7) Then convert the reduced augmented matrix to equation form (which is equiv-
alent to the given system of equations) and use backward substitution method
(i.e. start from the bottom of the system and substitute in the equations to the
top step by step)to find the values of the variables x, y and z.

SIM Global Education Page 12 of 47


Chapter 6(a): Linear Algebra 1

4.1.2 Row operations


For any augmented matrix of a system of equations, the following row operations
produce the augmented matrix of an equivalent system:
(1) Interchange of any two rows
(2) Multiply the elements of a row by any non-zero number.
(3) Adding the multiples of elements of one row to the corresponding elements of
another element.
Note:
To make changes in the first column, make use of the first row after making the first
element 1.
To make changes in the second column, make use of the second row after making
the second element 1.

Example 9
Use Gaussian elimination method to solve the following equation simultaneously.
x + 2y = 5
2x + y = −2

Solution: The equation in matrix form:


    
1 2 x 5
=
2 1 y −2

The augmented matrix is  


1 2 5
2 1 −2
Performing row operations:
 
1 2 5
R2 − 2R1 ⇒
0 −3 −12
   
1 1 2 5
− R2 ⇒
3 0 1 4

Changing to equation form and performing backward substitution:

y=4

x + 2y = 5
x + 2(4) = 5
⇒ x = −3

The solutions is x = −3, y = 4

SIM Global Education Page 13 of 47


Chapter 6(a): Linear Algebra 1

Example 10
Use Gaussian elimination method to solve the following equation simultaneously.
3x + 2y − z = −16
6x − 4y + 3z = 12
3x + 3y + z = −11

The equation in matrix form:


    
3 2 −1 x −16
6 −4 3  y  =  12 
3 3 1 z −11
The augmented matrix is
 
3 2 −1 −16
6 −4 3 12 
3 3 1 −11
Performing row operations:
 
3 2 −1 −16
R2 − 2R1
⇒ 0 −8 5 44 
R3 − R1
0 1 2 5

 
3 2 −1 −16
R3 ↔ R2 ⇒ 0 1 2 5 
0 −8 5 44

 
3 2 −1 −16
R3 + 8R2 ⇒ 0 1 2 5 
0 0 21 84

 
3 2 −1 −16
1
R3 ⇒ 0 1 2 5 
21
0 0 1 4
Changing to equation form and performing backward substitution:
z=4
y + 2z = 5
y = 5 − 2(4)
⇒ y = −3
3x + 2y − z = −16
3x = −16 − 2(−3) + 4
⇒ x = −2
The solution is x = −2, y = −3, z = 4

SIM Global Education Page 14 of 47


Chapter 6(a): Linear Algebra 1

Example 11
Use Gaussian elimination method to solve the following equation simultaneously.

x + y + 2z = 9
2x + 4y − 3z = 1
3x + 6y − 5z = 0

Answers: x = −1, y = 2, z = 3

SIM Global Education Page 15 of 47


Chapter 6(a): Linear Algebra 1

Example 12
Use Gaussian elimination method to solve the following equation simultaneously.

3a − 7b + 4c = 10
−a − 2b + 3c = 1
a + b + 2c = 8

answers: a = 3, b = 1, c = 2

SIM Global Education Page 16 of 47


Chapter 6(a): Linear Algebra 1

5 Determinants
A square arrangement of numbers enclosed by straight lines is called a determinant.
The following are

Example 13

2 3
(i) is a second order determinant.
5 5
2 0 1
(ii) 1 2 3 is a third order determinant.
2 4 5

For any 2 × 2 matrix, its determinant, denoted by det(A) is given by

a b
det(A) = A = = ad − bc
c d

For larger matrices, we break the determinant down into smaller determinants and
keep doing this until we end up finding the determinants of some 2 × 2 matrices
using the formula above. To do so, we need to introduce two terminology for a n × n
matrix A.

• The (i, j)-minor of M , denoted by Mi,j is the determinant of the (n − 1) ×


(n − 1) matrix formed by removing the ith row and jth column of A.

• The (i, j)-cofactor of A, denoted by Ci,j is the ‘signed minor’

(−1)i+j Mi,j

for each 1 ≤ i, j ≤ n.

SIM Global Education Page 17 of 47


Chapter 6(a): Linear Algebra 1

5.1 Properties
(1) Determinants have values.

(2) A third order determinant can be evaluated along any row and column.

Example14 
1 2 3
Let A =  0 1 1
−1 3 1

Solution: We need to determine the minors and their cofactor. The signs
of the cofactor are given by the following table:

+ − +
− + − ← (−1)2+3
(−1)1+3 →+ − +

The (1, 3)-, (2, 3)- and (3, 3)-minors of A are

0 1
M1,3 = = (0)(3) − (1)(−1) = 1
−1 3

⇒ the cofactor is C1,3 = (−1)1+3 M1,3 = (+1)(1) = 1

1 2
M2,3 = = (1)(3) − (2)(−1) = 5
−1 3

⇒ the cofactor is C2,3 = (−1)2+3 M1,3 = (−1)(5) = −5


1 2
M3,3 = = (1)(1) − (2)(0) = 1
0 1

⇒ the cofactor is C1,3 = (−1)3+3 M3,3 = (+1)(5) = 1

Expanding along the third column,

0 1 1 2 1 2
det(A) = (3) − (1) + (1)
−1 3 −1 3 0 1
= (3)(1) − (1)(5) + (1)(1)
= −1

SIM Global Education Page 18 of 47


Chapter 6(a): Linear Algebra 1

Example 15
Find the value of the determinant of the diagonal matrix
 
c1 0 0
D =  0 c2 0 
0 0 c3

Example 16  
2 −1 5
Find the value of the determinant of the square matrix M = −3 6 2 using
−1 0 4
cofactor expansion.

answer: 68

SIM Global Education Page 19 of 47


Chapter 6(a): Linear Algebra 1

Example 17  
1 1 2
Find the value of the determinant of the square matrix B = 2 4 −3 using
3 6 −5
cofactor expansion.

answer: −1

Example 18  
3 −7 4
Find the value of the determinant of the square matrix −1 −2 3 using cofactor
1 1 2
expansion.

answer: −52

SIM Global Education Page 20 of 47


Chapter 6(a): Linear Algebra 1

Example 19  
1 1 1 −1
2 2 3 0
Given that A =  0
, find the value of the determinant of A using
1 2 1
1 0 −1 2
cofactor expansion

Solution: Expanding along the 4th row and noting the signs of the cofactor are
−, +, −, +

1 1 −1 1 1 −1 1 1 1
det(A) = −(1) 2 3 0 + 0 − (−1) 2 2 0 + (2) 2 2 3
1 2 1 0 1 1 0 1 2

we expand each 3 × 3 determinants in turns and combine them

1 1 −1
2 3 1 1
2 3 0 = (−1) − (0) + (1)
1 2 2 3
1 2 1
= (−1)[4 − 3] + (1)[3 − 2]
=0

1 1 −1
2 2 1 1
2 2 0 = (−1) − 0 + (1)
0 1 2 2
0 1 1
= (−1)[2 − 0] − (2)[2 − 2]
= −2

1 1 1
2 3 1 1
2 2 3 = (1) − (2) +0
1 2 2 3
0 1 2
= (1)[4 − 3] − (2)[3 − 2]
= −1

Putting all the values together

det A = −(1)(0) + 0 − (−1)(−2) + (2)(−1)


= −4

SIM Global Education Page 21 of 47


Chapter 6(a): Linear Algebra 1

6 Cramer’s rule for solving systems of linear equa-


tions
The inverse matrix method for solving systems of linear equations gives rise to
another method, Cramer’s rule, which only involves finding determinants.

6.1 2-variable equation


Suppose we have to solve the equations

a11 x + a12 y = b1
a21 x + a22 y = b2

simultaneously. Cramer’s rule give the solution as follows:


∆x ∆y
x= ; y=
∆ ∆
where
a11 a12
∆=
a21 a22
is the determinant formed by the coefficients of x and y in two equations and

b1 a12 a b
∆x = and ∆y = 11 1 .
b2 a22 a21 b2

Notice that ∆x is obtained from ∆ by replacing the column of coefficients of x by the


column of constants; ∆y is obtained from ∆ by replacing the column of coefficients
of y by the column of constants.

SIM Global Education Page 22 of 47


Chapter 6(a): Linear Algebra 1

Example 20
Solving the following equations simultaneously using Cramer’s rule.

2x + y = 5
5x − 2y = 8

Solution:

2 1
∆=
5 −2
= −4 − 5
=9
5 1
∆x =
8 −2
= −10 − 8
= −18
2 5
∆y =
5 8
= 16 − 25
= −9
∆x −18
⇒x= = =2
∆ −9
∆y −9
⇒y= = =1
∆ −9
Therefore, the solution is x = 2, y = 1.

SIM Global Education Page 23 of 47


Chapter 6(a): Linear Algebra 1

6.2 3-variable equation


Suppose we have to solve the equations

a11 x + a12 y + a13 z = b1


a21 x + a22 y + a23 z = b2
a31 x + a32 y + a33 z = b3

simultaneously. Cramer’s rule give the solution as follows:


∆x ∆y ∆z
x= ; y= ; z=
∆ ∆ ∆
where
a11 a12 a13
∆ = a21 a22 a23
a31 a32 a33
is the determinant formed by the coefficients of x, y and z in three equations and

b1 a12 a13 a11 b1 a13 a11 a12 b1


∆x = b2 a22 a23 , ∆y = a21 b2 a23 and ∆z = a21 a22 b2 .
b3 a32 a33 a31 b3 a33 a31 a32 b3

Notice that ∆x is obtained from ∆ by replacing the column of coefficients of x by the


column of constants; ∆y is obtained from ∆ by replacing the column of coefficients
of y by the column of constants. ∆z is obtained from ∆ by replacing the column of
coefficients of z by the column of constants.

Example 21
Solving the following equations simultaneously using Cramer’s rule.

x − y + 2z = −1
4x + y + z = 13
5x − y + 8z = 5

Solution: Cramer’s rule give the solution as follows:


∆x ∆y ∆z
x= ; y= ; z=
∆ ∆ ∆

SIM Global Education Page 24 of 47


Chapter 6(a): Linear Algebra 1

where
1 −1 2
∆= 4 1 1
5 −1 8
1 1 4 1 4 1
=1 − (−1) +2
−1 8 5 8 5 −1
= (8 + 1) + (32 − 5) + 2(−4 − 5)
= 18

−1 −1 2
∆x = 13 1 1
5 −1 8
1 1 13 1 13 1
= −1 − (−1) +2
−1 8 5 8 5 −1
= (−1)(8 + 1) + (1)(104 − 5) + 2(−13 − 5)
= 54

1 −1 2
∆y = 4 13 1
5 5 8
13 1 4 1 4 13
=1 − (−1) +2
5 8 5 8 5 5
= (1)(104 − 5) + (1)(32 − 5) + 2(20 − 65)
= 99 + 27 − 90
= 36
1 −1 −1
∆z = 4 1 13
5 −1 5
1 13 4 13 4 1
=1 − (−1) −1
−1 5 5 5 5 −1
= (1)(5 + 13) + (1)(20 − 65) − 1(−4 − 5)
= −18

∆x 54
⇒x= = =3
∆ 18
∆y 36
⇒y= = =2
∆ 18
∆z −18
⇒y= = = −1
∆ 18

SIM Global Education Page 25 of 47


Chapter 6(a): Linear Algebra 1

Example 22
Solving the following equations simultaneously using Cramer’s rule.

x + y + 2z = 9
2x + 4y − 3z = 1
3x + 6y − 5z = 0

answers: ∆ = −1, ∆x = −1, ∆y = −2, ∆z = −3


x = 1, y = 2, z = 3

SIM Global Education Page 26 of 47


Chapter 6(a): Linear Algebra 1

Example 23
Solving the following equations simultaneously using Cramer’s rule.

x + 2y + 3z = 11
y+z =5
−x + 3y + z = 12

answers: ∆ = −1, ∆x = 1, ∆y = −3, ∆z = −2


x = −1, y = −3, z = 2

SIM Global Education Page 27 of 47


Chapter 6(a): Linear Algebra 1

7 Inverse of a matrix
Given a square matrix A, if there exist another square matrix B (of the same order
as A) such that
AB = BA = I,
then B is called the inverse of A and is denoted by A−1 . Therefore

AA−1 = A−1 A = I

Note:

(1) Inverse of a matrix is unique.

(2) Not all square matrices have inverses. The matrix whose determinant is zero
does not have an inverse. Such a matrix is called a singular matrix.

7.1 Matrix inverse of 2 × 2 matrix


 
a b
If A is a second order square matrix given by A = , where ad − bc 6= 0, the
c d
A has an inverse and
   
−1 1 d −b 1 d −b
A = =
det(A) −c a ad − bc −c a

Example 24  
3 2
Find the inverse of matrix A =
5 1

Solution:
3 2
det(A) =
5 1
= 3(1) − 2(5)
= −7 (6= 0)

 
−1 1 1 −2
A =
−7 −5 3
 
1 2
− 7 7 
= 5

3

7 7

SIM Global Education Page 28 of 47


Chapter 6(a): Linear Algebra 1

7.2 Matrix inverse of 3 × 3 matrix


We will now look at the formula to obtain the inverse of a 3 × 3 matrix, though it
is much more complicated. Suppose we have a 3 × 3 matrix
 
a11 a12 a13
A = a21 a22 a23  .
a31 a32 a33

Then A is invertible precisely when det(A) 6= 0. For 1 ≤ i, j ≤ 3, let Mij be the


determinant of the 2 × 2 matrix (i.e minor) obtained from A by deleting row i and
column j. For example,  
a11 a12
M23 =
a31 a32
Then it turns out that if det(A) 6= 0, then A is invertible.

So, we find M11 , M12 , M13 , M21 , . . . , M33 as described above. Then, we form the
matrix called the adjugate of A, denoted by the symbol adj (A), as given below:
 
+M11 −M12 +M13
adj (A) = −M21 +M22 −M23  .
+M31 −M32 +M33

Next, we write down the transpose of adj A, denoted by adj AT as follows:


 
+M11 −M21 +M31
(adj (A))T = −M12 +M22 −M32  .
+M13 −M23 +M33

The inverse of the 3 × 3 matrix A is given by the following formula


1
A−1 = (adj (A))T
det(A)

Calculating the inverse this way requires care, since we have to

(1) compute a 3 × 3 determinant i.e. det(A),

(2) compute 9 different 2 × 2 minors i.e. Mij ,

(3) attach correct signs for all Mij ,

(4) write down the adj (A),

(5) write down the (adj (A))T ,


1
(6) and finally compute A−1 = (adj (A))T
det(A)

SIM Global Education Page 29 of 47


Chapter 6(a): Linear Algebra 1

Example
 25 
−2 1 3
Given  0 −1 1, find A−1 .
1 2 0

Solution: we shall follow the steps listed above:

(1)compute a 3 × 3 determinant i.e. det(A),

−1 1 1 3 1 3
det(A) = (−2) − (0) + (1)
2 0 2 0 −1 1
= (−2)(0 − (−2)) + (1)(1 − (−3))
=4+4
=8

Since det(A) 6= 0, we know that A−1 exists.


(2)compute 9 different 2 × 2 minors i.e. Mij ,

−1 1 0 1 0 −1
M11 = = −2 M12 = = −1 M13 = =1
2 0 1 0 1 2

1 3 −2 3 −2 1
M21 = = −6 M22 = = −3 M23 = = −5
2 0 1 0 1 2

1 3 −2 3 −2 1
M31 = =4 M32 = = −2 M33 = =2
−1 1 0 1 0 −1
(3)attach correct signs for all Mij ,

+ − +
− + − ← (−1)2+3
(−1)1+3 →+ − +

SIM Global Education Page 30 of 47


Chapter 6(a): Linear Algebra 1

(4)write down the adj (A),


 
−2 1 1
adj (A) =  6 −3 5,
4 2 2
(5)write down the (adj (A))T ,
 
−2 6 4
(adj (A))T =  1 −3 2,
1 5 2
1
(6)and finally compute A−1 = (adj (A))T
det(A)
 
−2 6 4
1
A−1 =  1 −3 2
8
1 5 2

SIM Global Education Page 31 of 47


Chapter 6(a): Linear Algebra 1

Example 26  
1 1 2
Find the inverse of the following matrix A = 2 4 −3.
3 6 −5

answer: M11 = −2, M12 = −1, M13 = 0, M21 = −17,

M22 = −11, M23 = 3, M31 = −11, M32 − 7, M33 = 2


 
2 −17 11
−1
A = −1
 11 −7
0 3 −2

SIM Global Education Page 32 of 47


Chapter 6(a): Linear Algebra 1

Example 27  
1 2 3
Find the inverse of the following matrix A =  0 1 1.
−1 3 1
 
2 −7 1
−1 −4
answer: A = 1 1 
−1 5 −1

SIM Global Education Page 33 of 47


Chapter 6(a): Linear Algebra 1

8 Using inverse matrix to solve system of linear


equations
Suppose we want to solve the following equations simultaneously:

x + 3y = 5
3x − 2y = 4

We can write the equation in matrix form as follows:


    
1 3 x 5
=
3 −2 y 4
     
1 3 x 5
Let A = ,x= and b = .
3 −2 y 4
Then the above matrix equation is

Ax = b · · · · · · (1)
 
x
And we want to find the vector x = . Premultiply both sides of the equation
y
(1) by A−1

A−1 Ax = A−1 b
Ix = A−1 b
x = A−1 b
 
x
⇒ = A−1 b
y

SIM Global Education Page 34 of 47


Chapter 6(a): Linear Algebra 1

Example 28
Using the inverse you have found in example 26, solve the system of linear equations

x + y + 2z = 9
2x + 4y − 3z = 1
3x + 6y − 5z = 0

Solution:     
1 1 2 x 9
The equation in matrix form is 2 4 −3 y  = 1.
3 6 −5 z 0
 −1  
1 1 2 2 −17 11
From example 26, 2 4 −3 = −1 11 −7.
3 6 −5 0 3 −2

The solution to the system is given by

Ax = b
A−1 Ax = A−1 b
  
2 −17 11 9
x = −1 11 −7 1
0 3 −2 0
   
x 2 × 9 − 17 × 1 + 0
y  = −1 × 9 + 11 × 1 + 0
z 0+3×1+0
   
x 1
y  = 2
z 3

Therefore,
x = 1, y = 2, z = 3

SIM Global Education Page 35 of 47


Chapter 6(a): Linear Algebra 1

Example 29
Using the inverse you have found in example 26, solve the system of linear equations

x + 2y + 3z = 11
y+z =5
−x + 3y + z = 12

answer: x = −1, y = 3, z = 2

SIM Global Education Page 36 of 47


Chapter 6(a): Linear Algebra 1

9 Solutions of a linear system


A system of linear equations has

(1) no solution, or

(2) exactly one solution, or

(3) infinitely many solutions.

A system of linear equations is said to be

(1) consistent it it has either (a) one solution or (b) infinitely many solutions;
h i
(2) inconsistent if it has no solution, that is, there exist some row S c is of the
h i
form 0 0 . . . 0 c , with c 6= 0.

Consider a system of linear equation in R3 . Figure 1 illustrates an inconsistent


system: thre is no point commone to all three planes.

Figure 1: Two cases where three planes have no common point of intersection;
inconsistent system

Figure 2 illustrates a unique


solution: all three planes
intersection in exactly one
point.

Figure 2: Three planes with one intersection;


unique solution

SIM Global Education Page 37 of 47


Chapter 6(a): Linear Algebra 1

Figure 3 demonstrates a case


where there are infinitely
many solutions.

Figure 3: Three planes that meet in a common


line; infinitely many solutions

SIM Global Education Page 38 of 47


Chapter 6(a): Linear Algebra 1

Example 30
Each of the following is an augmented matrix of a system of linear equations. De-
termine whether the system is consistent. If it is, determine the gerneral solution.
 
1 2 −1 2
(a) 0 1 3 4
0 0 0 −5
Solution:
Since the bottom row is of the form 0 = −5, it is inconsistent
 
1 0 0 2
(b) 0 0 1 3
0 0 0 0
The system is consistent. Let x2 = t. Rewriting the system,

x3 = 3
x1 = 2
   
x1 2
 x2  =  t 
x3 3
     
x1 2 0
∴ x2  = 0 + t 1 , t ∈ R
x3 3 0

 
1 0 1 0 1
(c) 0 1 1 1 2
0 0 0 1 3
The system is consistent. Let x3 = s. Rewriting the system,

x4 = 3
x2 + s + 3 = 2
x2 = −1 − s
x1 + s = 1
x1 = 1 − s
   
x1 1−s
x2  −1 − s
 = 
x3   s 
x4 3
     
x1 1 −1
x2  −1 −1
∴ x3  =  0  + s  1  , s ∈ R
    

x4 3 0

SIM Global Education Page 39 of 47


Chapter 6(a): Linear Algebra 1

Example 31
Each of the following is an augmented matrix of a system of linear equations. De-
termine whether the system is consistent. If it is, determine the gerneral solution.
 
1 1 −1 3 1
(a) 0 0 2 1 3
0 0 0 1 −2
19
 

2 
   
x1 −1

 
x2   0   1 
 = + µ  , µ∈R

5 

x3  
  0 
x4 2  0
 

−2

 
1 0 1 −1 0
0 1 0 0 0
(b) 
0

0 0 0 0
0 0 0 0 0
     
x1 −1 1
 x2   0  0
∴   = s  + t 
     , s, t ∈ R
x3 1 0
x4 0 1

SIM Global Education Page 40 of 47


Chapter 6(a): Linear Algebra 1

Example 32
Solve each of the following systems by back-substitution and write the general
solution in standard form.
(a)

x − 3y = 5
y=4

Solution:

x − 3(4) = 5
x = 17
   
x 17
∴ =
y 4

(b)

x + 2y − z = 7
z=6

Solution:
From last equation, z = 6.
Let y = t.

x + 2y − z = 7
x + 2t − 6 = 7
x = 13 − 2t
   
x 13 − 2t
y  =  t 
z 6
     
x 13 −2
∴ y = 0 +t 1  , t∈R
    
z 6 0

SIM Global Education Page 41 of 47


Chapter 6(a): Linear Algebra 1

(c)

x + 3y − 2z = 4
y + 5z = 2
z=2
   
x 32
answers: ∴ y  = −8
z 2

(d)

x − 2y + z + 4w = 7
y − w = −3
z+w =2
     
x −1 −1
 y  −3
 =   + t 1  , t ∈ R
 
answer: 
z   2  −1
w 0 1

SIM Global Education Page 42 of 47


Chapter 6(a): Linear Algebra 1

Example 33
Each of the matrices is an augmented matrix of a system of linear equations.
Determine the values of a, b, c and d for which the systems are consistent. If a
system is consistent, determine whether the system has a unique solution.
 
2 4 −3 6
(a) 0 b 7 2
0 0 a a

Solution: we will consider the different cases


(1) if a 6= 0 and b 6= 0, then the matrix is consistent and has no free
variables, so the solution is unique
(2) if a = 0 and b 6= 0, the system is consistent, but x3 is a free variable, so
the solution solution is not unique.
(3) if a 6= 0 and b = 0, then using row reduction,

−3
 

2 4 −3 6
 2 4 6
a
0 0 7 2 R2 − R3 0 0 7 2

7 5a

0 0 a a 0 0 0
7
Hence the system is inconsistent
(4) if a = 0 and b = 0, the system is consistent and x2 is a free variable, so
the solution is not unique.

 
1 −1 4 −2 5
0 1 2 3 4
(b) 
0 0 d 5

7
0 0 0 cd c

SIM Global Education Page 43 of 47


Chapter 6(a): Linear Algebra 1

10 Tutorial questions
1. Write down the equations in matrix form. Use a matrix method to find the
numbers x, y and z that satisfy them.
(a)

2x − 3y − z = 0
2x + 3y + z = 8
x − 2y + 3z = 3

(b)

x − y + z = −3
−3x + 4y − z = 2
x − 3y − 2z = 7

(c)

x − 2y + 10z = 5
2x + y − 2z = 4
x + 3y + 4z = 7

(d)

4x + y − 2z = 4
2x + 3y − 2z = 4
2x + 5y + 2z = 8

(e)

−3x + y + z = 1
−x + y − z = −1
−5x + y + z = 3

2. Solve the systems of linear equations in Question 1 using Cramer’s rule.

3. Solve the systems of linear equations in Question 1 by using the inverse of the
coefficient matrix.

4. The supply function for a commodity takes the form

Q = aP 2 + bP + c ,

for some constants, a, b, c where P denotes price. When P = 1, the quantity


supplied is 10; when P = 2, the quantity supplied is 24; when P = 3, the
quantity supplied is 46. Find a system of linear equations for a, b and c. Use a
matrix method to solve these equations. Also determine the quantity supplied
when the price is 4.

SIM Global Education Page 44 of 47


Chapter 6(a): Linear Algebra 1

5. Three goods are sold in the same market. If their prices are x1 , x2 , x3 , then
their demand quantities y1 , y2 , y3 and the supply functions z1 , z2 , z3 are given
by the following equations.

y1 = 2x1 − x2 − 2x3 + 264


z1 = 4x1 + 4x2 + 5x3 − 30
y2 = 50 − 2x1 + x2 + x3
z2 = 2x2 + x3 − 20
y3 = 4x1 + 2x2 − 2x3 + 4
z3 = 16x1 + 2x3 − 40

Non-negative numbers x∗1 , x∗2 , x∗3 are said to be equilibrium prices if, when the
prices are x1 = x∗1 , x2 = x∗2 and x3 = x∗3 , then the supply and demand quantities
for each of the good are equal; that is y1 = z1 , y2 = z2 and y3 = z3 . Using
matrix methods, find the equilibrium prices.

6. For each of the following systems of linear equations:

(i) Write down the augmented matrix


(ii) Obtain a row equivalent matrix in row echelon form
(iii) Determine whether the system is consistent or inconsistent. If it is consis-
tent, determine the number of parameter(s) in the general solution.
(iv) If the system is consistent, write down its general solution in standard
form.
(a)

3x1 − 5x2 = 2
x1 + 2x2 = 4

(b)

x1 + 2x2 + x3 = 5
2x1 − 3x2 + 2x3 = 6

(c)

x1 + 2x2 − 3x3 = 8
x1 + 3x2 − 5x3 = 11
2x1 + 5x2 − 8x3 = 19

(d)

−3x1 + 6x2 + 16x3 = 36


x1 − 2x2 − 5x3 = −11
2x1 − 3x2 − 8x3 = −17

SIM Global Education Page 45 of 47


Chapter 6(a): Linear Algebra 1

(e)

x1 + 2x2 − x3 = 4
2x1 + 5x2 + x3 = 10
4x1 + 9x2 − x3 = 19

(f)

x1 + 2x2 − 3x3 = −5
2x1 + 4x2 − 6x3 + x4 = −8
6x1 + 13x2 − 17x3 + 4x4 = −21

7. Using matrix methods, find the values of the numbers a and b if the following
system of equations for infinitely many solutions. Find also, when a and b take
these values, all the solutions of the system.

x+y+z+w =4
x + 3y − z + 5w =8
2x − y + 3z − w =3
2x + 3y + az − 5w =b

8. Use a matrix method to determine the value of the constant, c, for which the
system of equations

x+y+z =6
x + 2y − z =2
x − y + 2z =5
x + 3y − z =c

is consistent. For this values of c, find all of the solutions to this system and say
whether you have found an unique solution or an infinite number of solutions.

SIM Global Education Page 46 of 47


Chapter 6(a): Linear Algebra 1

11 Answers to Tutorial questions


1. (a) x = 2, y = 1, z = 1
(b) x = 2, y = 1, z = −4
1
(c) x = 2, y = 1, z =
2
1
(d) x = 1, y = 1, z =
2
(e) x = −1, y = −2, z = 0

2. Refer to Question 1

3. Refer to Question 1

4. a = 4, b = 2, c = 4
If P = 4, the quantity supplied is Q = 76

5. x∗1 = 10.5, x∗2 = 49, x∗3 = 4

6. only answers to part (iv) are given.


   
x1 24/11
(a) x = = .
x2 10/11
     
x1 27/7 −1
(b) x = x2 = 4/7 + t 0  , t ∈ R.
    
x3 0 1
   
2 −1
(c) x = 3 + t  2  , t ∈ R
0 1
   
x1 2
(d) x = x2 = −1
  
x3 3
(e) The system is inconsistent.
   
−7 5
1 −1
(f) x = 
 0  + t 1 
  

2 0
7. a = b = 7
     
x 3 −2
 + t −1/2 , t ∈ R
 y   3/2   
 =
 z  −1/2  3/2 
w 0 1
8. c = 4, x = 1, y = 2, z = 3

SIM Global Education Page 47 of 47

You might also like