Professional Documents
Culture Documents
Chapter 1 Systems of Linear Equations and Matrices
Chapter 1 Systems of Linear Equations and Matrices
TECHNOLOGY
Matrices
A matrix A is a rectangular array of scalars usually presented in the following form:
a 11 a 12 ... a 1n
a a 22 ... a 2n
A 21
...
a a m2 ... a mn
m1
i. A matrix always denotes with capital letter
ii. The rows of such a matrix A are the m horizontal lists of scalars
a 11 a 12 ... a 1n , a 21 a 22 ... a 2n , … , a m1 a m2 ... a mn
iii. The columns of A are the n vertical lists of scalars:
a 11 a 12 a 1n
a 21 a 22 a 2n
, , … ,
a a a
m1 m2 mn
iv. A matrix with m rows and n columns is called and m by n matrix, written m x n.
v. The pair of numbers m and n called the size of the matrix.
Example:
1 2
1. A 3 4 = 3 by 2 matrix of matrix size 3 x 2, also can be written as
5 6
1 2
A 3 4 a11 = 1, a22 = 4, a31 = 5
5 6
3x2
2. B 3 0 1 5 6 = matrix size 1 x 5 …… row matrix
1
3. C 5 = matrix size 3 x 1 …… column matrix
2
Equal matrix
Two matrices A and B are equal, written A = B, if they have the same size and if
corresponding entries/ elements are equal.
Example:
2 3 a b
1. If , then a = 2, b = 3, x = -1 and y = 0
x y 1 0
x y 2z t 3 7
2. Find x, y , z and t such that
x y z t 1 5
By definitions of equality of matrices, the four corresponding entries must be equal,
thus
x + y = 3, x – y = 1, 2z + t = 7 and z – t = 5
Solving the above system of equations yields x = 2, y = 1, z = 4, and t = -1
Transpose of a matrix
If A is a matrix of size mxn, then the transpose of A, denoted by AT, is obtained by
interchanging the rows and columns in A
a 11 a 12 ... a 1n a 11 a 21 ... a m1
a a 22 ... a 2n a a 22 ... a m2
A 21 thus AT 12
... ...
a a m2 ... a mn a a 2n ... a mn
m1 1n
Example:
T 1 4 1
1 2 3 T
1. 2 5 2. 1 3 5 3
4 5 6 3 6 5
Diagonal Matrix
A square matrix
ALL the entries other than the main diagonal entries are zero. In other words, aij = 0
for i ≠ j
d1 0 0 0
0 d2 0 0
D 0 0 d3 0
0 0 0 dn
Triangular matrix
A square matrix
Two types of triangular matrix
i. Lower triangular matrix is a square matrix where ALL the entries above the
main diagonal entries are all zero
ii. Upper diagonal matrix is a square matrix where ALL the entries below the
main diagonal entries are all zero.
a 11 0 0 a 11 a 12 a 13
a 21 a 22 0 or 0 a 22 a 23
a a 32 a 33 0 0 a 33
31
Lower triangular matrix Main diagonal Upper triangular matrix
Identity Matrix
A square matrix
ALL the main diagonal entries are 1 and ALL the other entries are zero.
a ij 1 if i j
In
a ij 0 if i j
Example:
1 0
i. I
0 1
1 0 0
ii. I 0 1 0
0 0 1
1 0 0 0
0 1 0 0
iii. I
0 0 1 0
0 0 0 1
Zero matrix
A matrix whose entries are all zero is called a zero matrix and will usually be denoted
by 0
It needs not to be a square matrix
EXERCISE
4 0 1
iii. 0 1 0 iv. 1 2 7
4 0 1
0 0 0 3 0 0
iii. 0 4 1 iv. 0 5 0
8 1 5 0 0 1
1 2
v. 0 4
0 0
4 x 2
6. Find x and hence the matrix B such that B is a symmetric matrix.
2x 3 x 1
1. Matrix Addition
Let A = (aij) abd B = (bij) be two matrices with the same size, say mxn matrices. The
sum of A and B written A + B, is the matrix obtained by adding up corresponding
entries from A and B
In other words, A + B = (aij + bij) mxn
a 11 b11 a 12 b12 a in b1n
a b21 a 22 b22 a 2 n b2 n
A B 21
a bm 1 a m 2 bm 2 a mn bmn
m1
Example:
1 2 3 4 6 8
Given A and B , then
0 4 5 1 3 7
1 4 2 6 3 8 5 4 11
A B
0 4 3 5 7 1 1 2
2. Scalar Multiplication
Let A = (aij) and k be any scalar. Then, the product of the matrix A by a scalar k,
written k.A or simply kA, is the matrix obtained by multiplying each element of A by
k.
That is, kA = (kaij)
ka 11 ka 12 ka 1n
ka ka 22 ka 2 n
kA 21
ka ka m 2 ka mn
m1
Example:
31 3 2 33 3 6 9
3 A
30 34 35 0 12 15
3. Matrix Multiplication
Suppose A = (aij) be a m x n matrix and B = (bij) be a n x p matrix. Then the product
AB is the m x p matrix whose ij-entry is obtained by multiplying the ith row of A by
the jth column of B. That is
a 11 a 1 p b11 b1 j b1n c 11 c 1n
a bip c ij
i1
a m1 a mp b p 1 b pj b pn c m 1
c mn
b
Where c ij a ik bkj a i 1 b1 j a i 2 b2 j a ip b pj
k 1
A x B = AB
mxn nxp mxp
Example:
Find AB where
1 3 2 0 4
i. A and B
2 1 5 2 6
1 2 5 6
ii. A and B
3 4 0 2
2 1 0 6
2 0 1
iii. A and B 1 3 5 1
4 2 5 4 1 2 2
NOTE :
AB ≠ BA
AC = BC ≠ A = B
AB = 0 ≠ A = 0 and B = 0
4) Properties of a Transpose
NOTE : (AB)T ≠ AT BT
LINEAR SYSTEMS
The standard form for a linear equation with n variables x1, x2, x3, … xn
a1x1 + a2x2 + a3x3 + … + anxn = b
where a1, a2, a3, …,an and b are constants (real number)
a1, a2, a3, …an are called the coefficients of x1, x2, x3, … xn
a1 is called the leading coefficient
x1 is the leading variable
SYSTEM OF
LINEAR
EQUATION
CONSISTENT INCONSISTENT
INFINITELY
ONE UNIQUE
MANY NO SOLUTION
SOLUTION
SOLUTION
Example:
Solve the following system of linear equations simultaneously
i. x–y=0
3x – 2y = -1
ii. 4x + 2y = 6
2x + y = 3
iii. x+y=5
x + y = -3
1
Example: Multiplying the 1st row with
3
3 6 9 1 2 3
1
4 8 12 R1 R1 4 8 12
2 4 6 3 2 4 6
Example: Multiplying the 1st row with -2 and adding it to the 3rd row
1 2 4 5 1 2 4 5
1 1 6 6 R3 2 R1 R3 1 1 6 6
2 0 12 9 0 4 4 1
MATRIX TRANSFORMATION
Echelon Form:
Leading entry – the first nonzero coefficient in the row’s
Each leading entry is to the right of the leading entry in the row above it (except for
the leading entry in the first row)
Example:
2 3 9 0 1 4 8 Not
Comfortable 2 3 9 0 1 4 8
Comfortable
0 0 4 0 1 4 7 climbing 0 0 4 0 1 4 7
0 climbing
0 0 1 2 2 0 stair 0 0 1 1 0 2 0
stair
0 0 0 0 0 5 8 0 0 0 2 0 5 8
0 0 0 0 0 0 0 0 0 0 0 0 7 0
Echelon Form Not an Echelon Form
Step 3: Write down the row echelon matrix as a system of linear equations
Step 4: Solve the system by using back substitution and assign parameter(s) to
the three variable(s) (if any)
Example:
Solve the following system by Gaussian Elimination Method
x – 3y – 2z = 6
2x – 4y – 3z = 8
-3x + 6y + 8z = -5
1 3 2 6 1 3 2 6
2 4 3 8 R 2 2 R1 R 2 0 2 1 4
3 6 8 5 R 3 3 R1 R 3 0 3 2 13
Step 3: Check Row 2, the first entry in non-zero row MUST be leading 1
1 3 2 6 1 3 2 6
1
0 2 1 4 R 2 R2 0 1 1 2 2
0 3 2 13 2 0 3 2 13
1 3 2 6 1 3 2 6 1 3 2 6
0 1 1 2 2 0 1 1 2 0 1 1 2
2 0 0 2
0 3 2 13 R 3 R R
3 2 3 0 0 7 7 2 1 2
2 R 3 R 3
REF
7
R3 : z=2
R2 : y+½z=-2
y + ½ (2) = - 2
y+1=-2
y=-3
R1 : x – 3y – 2z = 6
x – 3 (-3) – 2 (2) = 6
x+9–4=6
x=1
x 1
Solution set = y 3
z 2
The system has unique solution/ exactly one solution
The system is consistent
Example:
Solve the following system by using Gaussian Elimination method
x 2 y 3z 1
1. y 2z 2
2 y 4z 4
x1 3 x 2 2 x 3 5 x4 4
2. 2 x1 8 x 2 x 3 9 x4 9
3 x 1 5 x 2 12 x 3 17 x 4 7
Example:
Which of the following matrix is REF or RREF?
1 3 2 0 4 5 6
0 0 0 1 3 2 0
1. 0 0 0 0 0 6 2
0 0 0 0 0 0 0
1 2 3
2. 0 0 1
0 0 0
1 0 3 0 0 4
3. 0 0 0 1 0 3
0 0 0 0 1 2
Example:
Solve each of the following systems by using Gauss Jordan Elimination Method
x 2y z 3 x1 x 2 2 x 3 4 x4 5
1. 2 x 5 y z 4 2. 2 x1 2 x2 4 x3 2 x4 3
3x 2 y z 5 3 x1 3 x 2 4 x 3 2 x4 1
x1 x 2 2 x 3 3 x4 4
3. 2 x1 3 x2 3 x 3 x4 3
5 x1 7 x 2 4 x 3 x4 5
Inverse of a Matrix
Anxn is said to be invertible if there exist a Bnxn such that
Anxn Bnxn = Bnxn Anxn = In
Example:
1 3 2 14 8 1
1
Let A 2 5 3 , then A 17 10 1
3 2 4 19 11 1
Indeed
1 3 2 14 8 1 1 0 0
1
AA 2 5 3 . 17 10 1 0 1 0 and
3 2 4 19 11 1 0 0 1
14 8 1 1 3 2 1 0 0
1
A A 17 10 1 . 2 5 3 0 1 0
19 11 1 3 2 4 0 0 1
Inverse of a 2 x 2 matrix
The inverse matrix of A is denoted by A-1
AA-1 = A-1A = 1
a b 1 d b
Let A Then A 1 provided that ad – bc ≠ 0
c d ad bc c a
Example:
Find the inverse of the matrices if it exists:
1 2 4 6
1. A 2. B
3 7 2 3
7 4 2 3
3. C 4. D
5 3 4 5
A I 37 1 0
2 5 0 1
3 7 1 0 1 0 b11 b12
Step 2 : Transform matrix into
0 1 b
2 5 0 1 21 b22
1 7 1
3 7 1 0 R1 R1 7 1 1 0 R 7 R R
1 0 3 3 1 2 1
2 5 0 1 3 3 3 0 1 2
2 5 0 1 R2 2 R1 R2 1
3 3
1 0 5 7 1 0 5 7
1 2
0 1 3 R2 R2 0 1 2 3
3 3
5 7
Thus, A 1
2 3
Example: Find A-1
1 0 2 1 1 1
1. A 2 1 3 2. A 0 1 2
4 1 8 1 2 4
1 1 1
3. A 0 1 1
1 3 2
1 2 0 1 0 0 1 2 0 1 0 0
1
1 0 1 0 1 0 R2 R1 R2 0 2 1 1 1 0 R2 R2
1 3 2 0 0 1 0 5 2
R 3 R1 R 3 2 1 0 1
1 2 0 1 0 0 1 2 0 1 0 0
1 1 1
0 1 0 0 1 1 1
1
0
2 2 2 2 2 2
0 5 2 1 0 1 R3 5 R2 R3 1 3 5 2 R3 R3
0 0 1
2 2 2
1 2 0 1 0 0 1 2 0 1 0 0 R1 2 R 2 R1
1 1 1 1
0 1 0 R2 R3 R2 0 1 0 1 2 1
2 2 2 2 0 0 1 3 5 2
0 0 1 3 5 2
1 0 0 3 4 2
0 1 0 1 2 1
0 0 1 3 5 2
3 4 2
1
Thus, A 1 2 1 and
3 5 2
x A 1 b
3 4 2 5
1 2 1 15
3 5 2 5
65
30
80
Example:
Solve the linear system using the inverse matrix
x 2y z 3
1. 2 x 5 y z 2
x 2 y 2z 0
x y 2 z 1
2. x 2 y 5z 0
x 3y 7z 3
x y 2 z 10
3. x 2 y 5 z 3
x 3y 7z 4
ASSIGNMENT
7. For matrices in (6), which are in the Echelon form, discuss whether the corresponding
systems of linear equations have a unique solution, infinitely many solutions or no
solutions at all. Write down solutions sets, if any.
8. Transform matrices in (6), which are not in the Echelon form, into Reduced Row-
Echelon form. Write down solutions sets, if any.
9. Solve the following system of linear equations by transforming its augmented matrix
to row-echelon form.
4 x1 5 x 2 6 x 3 3 3 x1 2 x 2 5 x 3 1
a. 8 x1 7 x 2 3 x 3 9 b. x1 x 2 x 3 4
7 x1 8 x 2 9 x 3 6 6 x 1 4 x 2 10 x 3 7
x1 3 x 2 x 3 2
c.
3 x1 8 x 2 2 x 3 5
10. Solve the following system of linear equations by transforming its augmented matrix
to reduced row-echelon form
5 x1 x 2 2 x3 3 x2 x3 6
a. 2 x1 4 x 2 x 3 8 b. 3 x1 x 2 x 3 0
x1 3 x 2 3 x 3 2 x 1 x 2 3 x 3 13
5 x1 2 x 3 x4 6
c. 2 x1 x 2 x 3 3 x4 0
9 x1 3 x 2 x 3 7 x4 4
1 3 2 2 5
5 7 1 1 3
11. Let A 2 1 4 , B 0 1 , C , D . Perform
5 1 0 3 6 3 1 2 2 5
the following operations on matrices if possible.
a. 2A + BC b. CD c. DC + B
d. A – CB e. 2A – 5D f. CD – 2B
g. AB – 3B
12. Four models of Yonex tennis racquets are sold by four retailers in the city. Model A is
sold at the price of $199.95 per racquet; model B - $169.95; model C - $119.95 and
model D- $ 99.99. The sales in August are given by the following table.
Sales in August
Model A Model B Model C Model D
Retailer 1 100 120 245 270
Retailer 2 45 105 128 250
Retailer 3 65 80 230 300
Retailer 4 140 125 210 320
Present these data in matrix form and using matrix operation, find revenue of each
retailer in August.
13. Three university libraries, located in different campuses ordered three titles of
textbooks; A, B and C. The prices of the textbooks are $22, $35 and $15 respectively.
The number of textbooks ordered is given by the following table:
Textbook A Textbook B Textbook C
Library 1 40 55 30
Library 2 15 25 10
Library 3 25 20 40
Applying matrix operations, find the price of the order for each library and total value
of the order.
14. Four teams’ results of a season are displayed in the following table
Won Drawn Lost
Team 1 6 5 10
Team 2 8 4 9
Team 3 5 10 6
Team 4 4 17 3
For the victory, a team is awarded with 3 points, 1 point for defeat and 2 points for the
draw. Arrange each result in a matrix form. Using matrix operation, evaluate the
number of points received by each team.
1 2 4 1 3 2
d. 2 1 3 e. 2 0 4
1 0 2 5 7 10
17. Solve the system of linear equations by presenting it in a matrix form Ax=b and
inverting matrix A
3x 7 y 5 4x 3y 5
a. b.
2 x 5 y 4 2 x y 12
x 1 2 x 2 13 x 1 x 2 x 3 2
c. x 1 x 3 3 d. 2 x1 x 2 x 3 4
x1 3 x2 2 x 3 4 2 x1 3 x 2 4 x 3 1
18. A company produces three different types of fertilizer by mixing nitrogen, phosphorus
and potassium in different proportions. The nutrient content (in percentage of mass)
of each type of fertilizer is given in the following table: