Matrices 202000211
Matrices 202000211
Matrices are basic tools in linear algebra and system of linear equations arise in all sorts of
applications to many different fields of study. In this chapter, we introduce the concepts of matrix
and discuss an application to solve systems of linear equations.
Row-Echelon Form
1
2 Chapter 1 Matrices and System of Linear Equations
Solved Examples
Example 1.1.1. Determine whether the following matrices are in row-echelon form, reduced
row-echelon form, both, or neither.
1 2 0 3 0
0 1 0 0 5
0 1 1 0 1 4 2 0
(i) , (ii) 0 0 1 3 , (iii)
0 0 0 0 1 0 1 2 −1
0 1 0 4
0 0 0 0 0
Solution. (i) The matrix in is in both row-echelon form and reduced row-echelon form.
(ii) The matrix in is neither in row-echelon form nor in reduced row-echelon form because leading
1 in the third row is not to the right of the leading 1 in the second row.
(iii) The matrix in is in row-echelon form but not in reduced row-echelon form because the leading
1 in the second row is not the only nonzero entry in its column.
Applying R4 → R4 + R3 , we get
1 3 2 0 1 0
0 2 1 1 1 1
0 0 0 2 −3 1
0 0 0 0 −4 1
1 3 2 0 1 0
1 1 1 1
0 1 2 2 2 2
0 0 0 1 − 32 1
2
0 0 0 0 1 − 14
Exercises
1 0 4 6
Exercise 1.1.1. Is 0 1 5 7 in row-echelon form or reduced row-echelon form ?
0 0 0 1
0 0
Exercise 1.1.2. Is row-echelon or reduced row-echelon form ?
0 0
1 3 0 2 0
1 0 2 2 0
Exercise 1.1.3. Is the matrix
0 0 0 0 1 in row echelon or reduced row-echelon form ?
0 0 0 0 0
1 0 3 1
Exercise 1.1.4. Is row-echelon or reduced row-echelon form ?
0 1 2 4
Exercise 1.1.5. Obtain a row-echelon form of the matrix
1 2 −3 1
−1 0 3 4
0 1 2 −1
2 3 0 −3
Exercise 1.1.6. Reduce the following matrix into reduced row-echelon form
1 2 3 −1
−2 −1 −3 −1
1 0 1 1
0 1 1 −1
Tutorial 1.2 Rank of a Matrix 5
Answers
Solved Examples
0 −1 2 12 16 −5
The last matrix is in a row-echelon form which contains two nonzero rows. Hence, rank(A) = 2.
6 Chapter 1 Matrices and System of Linear Equations
Exercises
1 −1 −1
Exercise 1.2.1. Find the rank of the matrix 4 −3 −1 .
3 −1 3
Exercise 1.2.2. Find the rank of a matrix
1 −1 2 0
A= 3 1 0 0
−1 2 4 0
Answers
We can capture all the information contained in the system in a single matrix as
a11 a12 · · · a1n b1
a21 a22 · · · a2n b2
[A : b] = ..
.. ... .. ..
. . . .
am1 am2 · · · amn bm
This matrix is called the augmented matrix of the system. To solve such type of system, we will
discuss following two methods:
Perform the elementary row operations to put the matrix into row-echelon form.
Perform the elementary row operations to put the matrix into reduced row-echelon form.
Types of Solutions
There are three types of solutions which are possible when solving a system of linear equations:
(1) Independent
Consistent.
Unique Solution.
A row-echelon form has the same number of non-zero rows as variables.
(2) Dependent
Consistent.
Infinitely many solutions.
A row-echelon form has more variables than non-zero rows.
(3) Inconsistent
No Solution.
A row-echelon form has a zero row on the left side, but the right hand side is not zero.
8 Chapter 1 Matrices and System of Linear Equations
Every system of linear equations has either no solutions, or has exactly one solution, or has
infinitely many solutions.
Solved Examples
x + y − 3z = 4
2x + y − z = 2
3x + 2y − 4z = 6
x + y − 3z = 4
y − 5z = 6
Example 1.3.2. Use Gaussian elimination to solve the system of linear equations
2x2 + x3 = −8
x1 − 2x2 − 3x3 = 0
−x1 + x2 + 2x3 = 3
Applying R1 ↔ R2 we get
1 −2 −3 0
0 2 1 −8
−1 1 2 3
Applying R3 → R1 + R3 we get
1 −2 −3 0
0 2 1 −8
0 −1 −1 3
Applying R2 ↔ R3 we get
1 −2 −3 0
0 −1 −1 3
0 2 1 −8
Applying R2 (−1) we get
1 −2 −3 0
0 1 1 −3
0 2 1 −8
Applying R3 → R3 − 2R2 we get
1 −2 −3 0
0 1 1 −3
0 0 −1 −2
Applying R3 → (−1)R3 , we get
1 −2 −3 0
0 1 1 −3
0 0 1 2
which is in row-echelon form. Here number of the numbers non-zero rows is same as the number
of unknowns, so that system has a unique solution. The system corresponding to the last matrix
is
x1 − 2x2 − 3x3 = 0, x2 + x3 = −3, x3 = 2.
Using back substitution, we get
x1 = −4, x2 = −5, x3 = 2.
Example 1.3.3. Use Gaussian elimination to solve the system of linear equations
x1 − 2x2 − 6x3 = 12
2x1 + 4x2 + 12x3 = −17
x1 − 4x2 − 12x3 = 22
Solution. The augmented matrix is
1 −2 −6 12
2 4 12 −17
1 −4 −12 22
Applying R2 → R2 − 2R1 and R3 → R3 − R1 we get
1 −2 −6 12
0 8 24 −41
0 −2 −6 10
10 Chapter 1 Matrices and System of Linear Equations
1
Applying R2 → R2 we get
8
1 −2 −6 12
0 1 3 − 41
8
0 −2 −6 10
Applying R3 → R3 + 2R2 we get
1 −2 −6 12
0 1 3 − 41
8
1
0 0 0 −4
Applying R3 → (−4)R3 , we get
1 −2 −6 12
0 1 3 − 41
8
0 0 0 1
which is in row-echelon form. The system corresponding to the last matrix is
x1 − 2x2 − 6x3 = 12
41
x2 + 3x3 = −
8
0x1 + 0x2 + 0x3 = 1
From the last equation, we get 0 = 1, which is not possible. So, given system is inconsistent and
has no solution.
Example 1.3.4. Solve the following system of linear equations by Gauss-Jordan elimination
method:
x1 + x2 + 2x3 = 8
−x1 − 2x2 + 3x3 = 1
3x1 − 7x2 + 4x3 = 10
1
Applying R3 → − 52 R3 , we get
1 1 2 8
0 1 −5 −9
0 0 1 2
Applying R2 → R2 + 5R3 and R1 → R1 − 2R3 , we get
1 1 0 4
0 1 0 1
0 0 1 2
Applying R1 → R1 − R2 , we get
1 0 0 3
0 1 0 1
0 0 1 2
which is in reduced row-echelon form. The system corresponds to the last matrix is
x1 = 3, x2 = 1, x3 = 2.
2x1 + 2x2 − x3 + x5 = 0
−x1 − x2 + 2x3 − 3x4 + x5 = 0
x1 + x2 − 2x3 − x5 = 0
x3 + x4 + x5 = 0
Exercises
Additional Exercises
Exercise 1.3.11. Solve the following system of linear equations by any method:
Exercise 1.3.12. Show that the following nonlinear system has 18 solutions if 0 ≤ α ≤ 2π,
0 ≤ β ≤ 2π, 0 ≤ γ ≤ 2π:
Answers
1.3.1 x = − 17 , y = − 12
7
, z = −4
1.3.2 x = t − 1, y = 2s, z = s, w = t 1.3.3 Inconsistent
1.3.4 x1 = −4, x2 = 2, x3 = 7 1.3.5 Inconsistent
1.3.6 u = 7s − 5t, v = −6s + 4t, w = 2s, x = 2t
1.3.7 x1 = 0, x2 = 0, x3 = 0, x4 = 0 1.3.8 x = 12 , y = 41 , z = 15
1.3.9 α = π2 , β = π, γ = 0
1.3.10 no solution for a = −4, exactly one solution for a 6= ±4, infinitely many solutions for a = 4
Let A = (aij ) be a square matrix. Then the minor of entry aij is denoted by Mij and is defined
to be the determinant of the submatrix that remains after the ith row and j th column are deleted
from A.
The cofactor of entry aij is denoted by Cij and is defined as Cij = (−1)i+j Mij .
Section 1.4 Inverse of a Matrix 15
Adjoint of a Matrix
Let A = (aij ) be any n × n matrix. If Cij is the cofactor of aij , then the matrix
C11 C12 · · · C1n
C21 C22
· · · C2n
.. .. ..
. . .
Cn1 Cn2 · · · Cnn
is called the matrix of cofactors from A. The transpose of this matrix is called the adjoint of A
and is denoted by adj(A).
a b
In particular, for 2 × 2 matrix A = , we have
c d
d −b
adj(A) =
−c a
Let A be a given square matrix with det(A) 6= 0. Then A−1 can be obtained as follows:
Form a new matrix by augmenting the identity matrix I to the right side of A as
A|I .
By applying appropriate row operations, reduce the left side to I; these operations will
convert the right side to A−1 , so the final matrix will have the form
I | A−1 .
Solved Examples
1 2
Example 1.4.1. Find the inverse of matrix A =
1 3
Solution. Observe that
1 2
det(A) = = 3 − 2 = 1 6= 0.
1 3
Therefore, A−1 exists and is given by
−1 1 3 −2
A = adj(A) =
det(A) −1 1
16 Chapter 1 Matrices and System of Linear Equations
Example 1.4.2. Find the inverse of the following matrix by Gauss Jordan method if it is invert-
ible:
2 1 5
A = −1
0 1
3 2 0
Solution. First we have to check about the existence of A−1 . It is known that A−1 exists if and
only if det(A) 6= 0. Here,
2 1 5
det(A) = −1 0 1 = 2(0 − 2) − 1(0 − 3) + 5(−2 − 0) = −4 + 3 − 10 = −11 6= 0.
3 2 0
Therefore, A−1 exists. Now
2 1 5 1 0 0
A | I = −1 0 1 0 1 0
3 2 0 0 0 1
Applying the operation R1 ↔ R2 , we get
−1 0 1 0 1 0
2 1 5 1 0 0
3 2 0 0 0 1
Applying the operations R2 → R2 + 2R1 and R3 → R3 + 3R1 , we get
−1 0 1 0 1 0
0 1 7 1 2 0
0 2 3 0 3 1
Applying the operation R3 → R3 − 2R2 , we get
−1 0 1 0 1 0
0 1 7 1 2 0
0 0 −11 −2 −1 1
1
Applying the operation R3 → − 11 R3 , we get
−1 0 1 0 1 0
0 1 7 1 2 0
2 1 1
0 0 1 11 11
− 11
Since the left side of the last matrix is I, the right side will be A−1 . Thus
2
11
− 10
11
1
− 11
3 15 7
A−1 = −
11 11 11
2 1 1
11 11
− 11
Since the left side of the last matrix is I, the right side will be A−1 . Thus
1 1 1
2
− 2 2
A−1 = 0 0 1
1 1 1
2 2
−2
18 Chapter 1 Matrices and System of Linear Equations
Exercises
1 2
Exercise 1.4.1. Find the inverse of the matrix A =
3 4
1 2 3
Exercise 1.4.2. Find A−1 using row operations, if A = 2 5 3
1 0 8
Exercise 1.4.3. Find the inverse of the matrix A using Gauss Jordan method, if
1 1
− 52
5 5
1 1 1
A= 5 5 10
1 4 1
5
− 5 10
Additional Exercises
Exercise 1.4.6. Find the inverse of each of the following 4 × 4 matrices, k1 , k2 , k3 , k4 and k are
all nonzero.
k1 0 0 0 0 0 0 k1 k 0 0 0
0 k2 0 0 0 0 k2 0 1 k 0 0
(i)
0 0 k3 0
(ii)
0 k3 0 0 (iii)
0
1 k 0
0 0 0 k4 k4 0 0 0 0 0 1 k
Answers
−40 16 9
−2 1
1.4.1 3 1.4.2 13 −5 −3
− 21
2 5 −2 −1
1 0 0 0
1 3 1 −1 1
0 0
3 3
1.4.3 0 1 −1 1.4.4 not invertible 1.4.5 0 − 1
1
5 5
0
−2 2 0
0 0 − 17 1
7
If A is an invertible n × n matrix, then for each n × 1 matrix b, the system Ax = b has exactly
one solution x= A−1 b. Equivalently, the system Ax = b is consistent for every n × 1 matrix b if
and only if det(A) 6= 0.
Remark. For the homogenous system Ax = 0, if det(A) 6= 0, then the system has only the trivial
solution x = 0.
Solved Examples
Example 1.5.1. Solve the following system by inverting the coefficient matrix:
x+y+z = 5
x + y − 4z = 10
−4x + y + z = 0
Observe that
Therefore, A−1 exists and we can apply matrix inversion method. Now
1 1 1 1 0 0
A|I = 1 1 −4 0 1 0
−4 1 1 0 0 1
20 Chapter 1 Matrices and System of Linear Equations
1 1 1 1 0 0
0 5 5 4 0 1
0 0 1 5 − 15 0
1
1 0 45 1
1 5
0
0 5 0 3 1 1
0 0 1 15 − 15 0
1
Applying the operation R2 → 5
R2 , we get
4 1
1 1 0 5 5
0
0 1 0 3 1 1
5 5 5
1
0 0 1 5
− 15 0
1
0 − 15
5
3 1 1
A−1 =
5 5 5
1 1
5
−5 0
Hence
1 0 −1 5 1
1
x = A−1 b = 3 1 1 10 = 5
5
1 −1 0 0 −1
Thus the solution is
x1 = 1, x2 = 5, x3 = −1.
1.5 Linear System and Invertibility 21
Exercises
Exercise 1.5.1. Solve the following system by inverting the coefficient matrix
Exercise 1.5.2. What condition must b1 , b2 and b3 satisfy in order for the system
x1 + 2x2 + 3x3 = b1
2x1 + 5x2 + 3x3 = b2
x1 + 8x3 = b3
to be consistent?
Exercise 1.5.3. What condition must b1 , b2 and b3 satisfy in order for the following system to
be consistent?
Additional Exercises
(λ − 3)x + y = 0
x + (λ − 3)y = 0
Exercise 1.5.5. Find conditions that the b0 s must satisfy for the system to be consistent.
x1 − x2 + 3x3 + 2x4 = b1
−2x1 + x2 + 5x3 + x4 = b2
−3x1 + 2x2 + 2x3 − x4 = b3
4x1 − 3x2 + x3 + 3x4 = b4
Exercise 1.5.7. Determine (without solving) whether the homogeneous system has a nontrivial
solution; then state whether the corresponding coefficient matrix is invertible.
2x1 + x2 − 3x3 + x4 = 0
5x2 + 4x3 + 3x4 = 0
x3 + 2x4 = 0
3x4 = 0
22 Chapter 1 Matrices and System of Linear Equations
Exercise 1.5.8. Determine (without solving) whether the homogeneous system has a nontrivial
solution; then state whether the corresponding coefficient matrix is invertible.
5x1 + x2 + 4x3 + x4 = 0
2x3 − x4 = 0
x3 + x4 = 0
7x4 = 0
Exercise 1.5.9. What restrictions must be placed on x and y for the following matrices to be
invertible?
x y x 0 x y
(i) (ii) (iii)
x x y y y x
Answers
zzzzzzz