MODULE+2+ +Matrices+and+Determinant+2023+Updated
MODULE+2+ +Matrices+and+Determinant+2023+Updated
Topics
I. Definition of a Matrix
II. Operations with Matrices
III. Matrices and Systems of Equations
IV. Inverse of Square Matrix
V. The Determinant of Square Matrix
I. DEFINITION OF A MATRIX
If m and n are positive integers, then an m n matrix (read “m by n”) is a rectangular array
Terminology
▪ A matrix with m rows and n columns is called a matrix of order m n.
▪ A square matrix is a matrix with an equal number of rows and columns. Since the
number of rows and columns are the same, it is said to have order n.
▪ The main diagonal of a square matrix are the elements from the upper left to the lower
right of the matrix.
▪ A row matrix is a matrix that has only one row.
▪ A column matrix is a matrix that has only one column.
▪ A matrix with only one row or one column is called a vector.
Equality
Two matrices are equal if and only if
▪ The order of the matrices are the same
▪ The corresponding elements of the matrices are the same
MODULE 2 – Matrices and Determinants 2
Engr. Caesar P. Llapitan
Addition
If A = aij and B = bij are matrices of order m n, then their sum is the m n matrix
given by A + B = aij + bij
Examples:
−1 2 1 3 ( −1 + 1 ) ( 2 + 3 ) 0 5
+ = =
( 1 + 2 ) −1
1.
0 1 −1 2 ( 0 − 1 ) 3
1 −1 0
2. −3 + 3 = 0
−2 2 0
2 1 0 0 1
3. 4 0 −1 + −1 3 = undefined
3 −2 2 2 4
Subtraction
▪ The order of the matrices must be the same
▪ Subtract corresponding elements
▪ Matrix subtraction is not commutative (neither is subtraction of real numbers)
▪ Matrix subtraction is not associative (neither is subtraction of real numbers)
Scalar Multiplication
If A = aij is an m n matrix and c is a scalar, then the scalar multiple of A by c is the
m n matrix given by cA = c aij
Examples:
Given
1 2 4 2 0 0
A = −3 0 −1 and B = 1 −4 3
2 1 2 −1 3 2
Find: a) 3A b) -B c) 3A – B
Solution:
MODULE 2 – Matrices and Determinants 3
Engr. Caesar P. Llapitan
1 2 4 3 ( 1 ) 3 ( 2 ) 3 ( 4 ) 3 6 12
a) 3 A = 3 −3 0 −1 = 3 ( −3 ) 3 ( 0 ) 3 ( −1 ) = −9 0 −3
2 1 2 3 ( 2 ) 3 ( 1 ) 3 ( 2 ) 6 3 6
−2 0 0
b) − B = ( −1 ) B = −1 4 −3
1 −3 −2
3 6 12 −2 0 0 1 6 12
c) 3 A − B = 3 A + ( −1 ) B = −9 0 −3 + −1 4 −3 = −10 4 −6
6 3 6 1 −3 −2 7 0 4
Zero Matrix
▪ Matrix of any order
▪ Consists of all zeros
▪ Denoted by capital O
▪ Additive Identity for matrices
▪ Any matrix plus the zero matrix is the original matrix
Matrix Multiplication
Am×n × Bn×p = Cm×p
▪ The number of columns in the first matrix must be equal to the number of rows in
the second matrix. That is, the inner dimensions must be the same.
▪ The order of the product is the number of rows in the first matrix by the number of
columns in the second matrix. That is, the dimensions of the product are the outer
dimensions.
▪ Since the number of columns in the first matrix is equal to the number of rows in
the second matrix, you can pair up entries.
▪ Each element in row i from the first matrix is paired up with an element in column j
from the second matrix.
▪ The element in row i, column j, of the product is formed by multiplying these paired
elements and summing them.
▪ Each element in the product is the sums of the products of the elements from row i
of the first matrix and column j of the second matrix.
▪ There will be n products which are summed for each element in the product.
Consider the product of a 2×3 matrix and a 3×4 matrix. The multiplication is defined because
the inner dimensions (3) are the same. The product will be a 2×4 matrix, the outer dimensions.
1 −8 4 −3
1 −2 3 25 −5 −13 5
−3 6 7 2=
4 5 −2 −23 −12 53 −10
6 5 −1 4
23 34 = 24
1 −8 4 −3
1 −2 3
−3 6 7 2
4 5 −2
= undefined
6
5 −1 4
34 23
Thus
▪ Multiplication of real numbers is not commutative.
▪ The inner dimensions may not agree if the order of the matrices is changed.
Example:
−1 3 c11 c12
4 −2 −3 2 = c
c22
−4 1 21
5 0 2 2 c31 c32
32 32
where:
Therefore,
−1 3 −9 1
4 −2 −3 2 = −4 6
−4 1
5 0 −15 10
32
Identity Matrix
▪ Square matrix
▪ Ones on the main diagonal; Zeros everywhere else
▪ Denoted by I. If a subscript is included, it is the order of the identity matrix.
▪ I is the multiplicative identity for matrices
▪ Any matrix times the identity matrix is the original matrix.
▪ Multiplication by the identity matrix is commutative, although the order of the
identity may change
1 0
Identity matrix of size 2 I =
0 1
MODULE 2 – Matrices and Determinants 5
Engr. Caesar P. Llapitan
1 0 0
Identity matrix of size 3 I = 0 1 0
0 0 1
Properties of Matrices
Property Examples
▪ Commutativity of Addition A+B=B+A
▪ Associativity of Addition A + (B + C) = (A + B) + C
▪ Associativity of Scalar Multiplication (cd) A = c (dA)
▪ Scalar Identity 1A = A(1) = A
▪ Distributive c (A + B) = cA + cB
▪ Distributive (c + d) A = cA + dA
▪ Additive Identity A+O=O+A=A
▪ Associativity of Multiplication A (BC) = (AB) C
▪ Left Distributive A (B + C) = AB + AC
▪ Right Distributive (A + B) C = AC + BC
▪ Scalar Associativity / Commutativity c (AB) = (cA) B = A (cB) = (AB) c
▪ Multiplicative Identity IA = AI = A
Commutativity of Multiplication
▪ You cannot change the order of a multiplication problem and expect to get the same
product. AB ≠ BA
▪ You must be careful when factoring common factors to make sure they are on the
same side. AX + BX = (A + B)X and XA + XB = X(A + B) but AX + XB doesn't factor.
1 2
A=
3 4
The initial attempt to evaluate the f(A) would be to replace every x with an A to get f(A) =
2
A - 4A + 3. There is one slight problem, however. The constant 3 is not a matrix, and you can't
add matrices and scalars together. So, we multiply the constant by the Identity matrix.
MODULE 2 – Matrices and Determinants 6
Engr. Caesar P. Llapitan
f(A) = A2 - 4A + 3I.
Evaluate each term in the function and then add them together.
1 2 1 2 7 10
A2 = =
3 4 3 4 15 22
1 2 −4 −8
−4 A = − 4 =
3 4 −12 −16
1 0 3 0
3I = 3 =
0 1 0 3
7 10 -4 -8 3 0 6 2
f ( A) = + + =
15 22 -12 -16 0 3 3 9
Factoring Expressions
Some examples of factoring are shown. Simplify and solve like normal, but remember that
matrix multiplication is not commutative and there is no matrix division.
2X + 3X = 5X
AX + BX = (A + B)X
XA + XB = X(A + B)
AX + 5X = (A + 5I)X
AX + XB does not factor
Common uses of matrix is to represent a system of linear equation. Each equation in the system
becomes a row. Each variable in the system becomes a column. The variables are dropped and
the coefficients are placed into a matrix.
The matrix derived from the coefficients and constant terms of a system of equations is called
the augmented matrix of the system.
The matrix containing only the coefficient of the system is called the coefficient matrix.
x y z rhs
1 1 -1 1
3 -2 1 3
4 1 -2 9
MODULE 2 – Matrices and Determinants 7
Engr. Caesar P. Llapitan
Another example:
x − 4 y + 3z = 5 1 −4 3 5 1 −4 3
− x + 3 y − z = −3 −1 3 −1 −3 − 1 3 −1
2x − 4z = 6 2 0 −4 6 2 0 −4
Augmented Matrix Coefficient Matrix
When working with systems of linear equations, there are three operations you can perform
which will not change the solution set.
1. Interchange two equations.
2. Multiply an equation by a non-zero constant.
3. Multiply an equation by a non-zero constant and add it to another equation, replacing
that equation.
Examples:
1. Interchange two rows
0 1 3 4 −1 2 0 3
−1 2 0 3 m1 ⎯⎯⎯⎯⎯→ m2 0 1 3 4
interchange
2 −3 4 1 row 1 and row 2 2 −3 4 1
2 −4 6 −2 1 −2 3 −1
1 3 −3 0 1
m1 = new m1 1 3 −3 0
2
5 −2 1 2 5 −2 1 2
3. Multiply a row by a non-zero constant and add it to another row, replacing that row
1 2 −4 3 1 2 −4 3
0 3 −3 0 0 3 −3 0
( −2 m1 ) + m3 = new m3
5 −2 1 2 3 −6 9 −4
Row-Echelon Form
A matrix is in row-echelon form when the following conditions are met.
1. If there is a row of all zeros, then it is at the bottom of the matrix.
2. The first non-zero element of any row is a one. That element is called the leading one.
3. The leading one of any rows is to the right of the leading one of the previous rows.
Notes:
▪ The leading one of a row does not have to be to the immediate right of the leading
one of the previous row.
▪ A matrix in row-echelon form will have zeros below the leading ones.
▪ Gaussian Elimination places a matrix into row-echelon form, and then back
substitution is required to finish finding the solutions to the system.
▪ The row-echelon form of a matrix is not necessarily unique.
Notes:
▪ The leading one of a row does not have to be to the immediate right of the leading
one of the previous row.
▪ A matrix in row-echelon form will have zeros both above and below the leading ones.
▪ Gauss-Jordan Elimination places a matrix into reduced row-echelon form.
▪ No back substitution is required to finish finding the solutions to the system.
▪ The reduced row-echelon form of a matrix is unique.
1 0 0 1 0 0 0
0 1 0 1 0 0 5 0 1 0 0 1 0
0 0 1 2 0 1
1 0 1 0 0 0 1
1 0 0 1 0 0 1 0 0 1 0 3
0 0 0 0 0 1 0 2 0 0 1 0
0 1 0 0 1 0 0 0 1 0 0 1
Gaussian Elimination
▪ Write a system of linear equations as an augmented matrix
▪ Perform the elementary row operations to put the matrix into row-echelon form
▪ Convert the matrix back into a system of linear equations
▪ Use back substitution to obtain all the answers
MODULE 2 – Matrices and Determinants 9
Engr. Caesar P. Llapitan
Example:
Solve:
x 2 + x 3 − 2 x 4 = −3
x 1 + 2 x2 − x 3 =2
2 x 1 + 4 x2 + x 3 − 3 x4 = −2
x 1 − 4 x2 − 7 x 3 − x4 = −19
Solution:
▪ Augmented matrix:
0 1 1 −2 −3
1 2 −1 0 2
2 4 1 −3 −2
1 −4 −7 −1 −19
▪ Interchange m1 and m2
1 2 −1 0 2
0 1 1 −2 −3
2 4 1 −3 −2
1 −4 −7 −1 −19
▪ ( −2m1 ) + m3 = new m3
1 2 −1 0 2
0 1 1 −2 −3
0 0 3 −3 −6
1 −4 −7 −1 −19
▪ ( −1 m1 ) + m4 = new m4
1 2 −1 0 2
0 1 1 −2 −3
0 0 3 −3 −6
0 −6 −6 −1 −21
▪ ( 6 m2 ) + m4 = new m4
1 2 −1 0 2
0 1 1 −2 −3
0 0 3 −3 −6
0 0 0 −13 −39
1 1
▪ m3 = new m3 and − m4 = new m4
2 13
1 2 −1 0 2
0 1 1 −2 −3
0 0 1 −1 −2
0 0 0 1 3
MODULE 2 – Matrices and Determinants 10
Engr. Caesar P. Llapitan
Therefore: x4 = 3 x3 = 1 x2 = 2 x1 = −1
Gauss-Jordan Elimination
▪ Write a system of linear equations as an augmented matrix
▪ Perform the elementary row operations to put the matrix into reduced row-echelon
form
▪ Convert the matrix back into a system of linear equations
▪ No back substitution is necessary
Example:
Solve
x − 2y + 3z = 9
−x + 3 y = −4
2 x − 5 y + 5 z = 17
Solution:
▪ Augmented matrix:
1 −2 3 9
−1 3 0 −4
2 −5 5 17
▪ m1 + m2 = new m2
1 −2 3 9
0 1 3 5
2 −5 5 17
▪ ( −2m1 ) + m3 = new m3
1 −2 3 9
0 1 3 5
0 −1 −1 −1
▪ m2 + m3 = new m3
1 −2 3 9
0 1 3 5
0 0 2 4
1
▪ m3 = new m3
2
MODULE 2 – Matrices and Determinants 11
Engr. Caesar P. Llapitan
1 −2 3 9
0 1 3 5
0 0 1 2
▪ ( 2 m2 ) + m1 = new m1
1 0 9 19
0 1 3 5
0 0 1 2
▪ ( −3 m3 ) + m2 = new m2
1 0 9 19
0 1 0 −1
0 0 1 2
▪ ( −9 m3 ) + m1 = new m1
1 0 0 1
0 1 0 −1
0 0 1 2
Pivoting
▪ Pivoting is a process which automates the row operations necessary to place a matrix
into row-echelon or reduced row-echelon form
▪ In particular, pivoting makes the elements above or below a leading one into zeros
3x + 2y - 4z = 3
2x + 3y + 3z = 15
5x - 3y + z = 14
The goal when solving a system of equations is to place the augmented matrix into reduced
row-echelon form, if possible.
There are three elementary row operations that you may use to accomplish placing a matrix
into reduced row-echelon form.
Each of the requirements of a reduced row-echelon matrix can satisfied using the elementary
row operations.
MODULE 2 – Matrices and Determinants 12
Engr. Caesar P. Llapitan
▪ The first non-zero element of any row is a one. That element is called the leading one.
Multiply (divide) the row by a non-zero constant to make the first non-zero element
into a one.
▪ The leading one of any row is to the right of the leading one of the previous row.
Multiply a row by a non-zero constant and add it to another row, replacing that row.
The point of this elementary row operation is to make numbers into zeros. By making
the numbers under the leading ones into zero, it forces the first non-zero element of any
row to be to the right of the leading one of the previous row.
The "pivot" or "pivot element" is an element on the left-hand side of a matrix that you want
the elements above and below to be zero.
• You can multiply a row by a non-zero constant and add it to a non-zero multiple of
another row, replacing that row.
Let's take the example we had before, and clear the first column.
x y z rhs
3 2 -4 3
2 3 3 15
5 -3 1 14
Helpful Hints
▪ Although you do not have to pivot on a one, it is highly desirable. Pivoting on a one
means that you're multiplying by 1 (which is easy to do).
▪ It is nice to pivot on the main diagonal, but not absolutely necessary. Some people like
to start in the upper left and work their way down to the lower right.
▪ As long as you pivot only once per row and column, the columns which have been
cleared will remain cleared.
▪ Since the point of pivoting is to clear the pivot column, picking a column which already
has zeros in it saves time because you don't have to change the row that contains the
zero.
Selecting a Pivot
▪ Pick the column with the most zeros in it.
▪ Use a row or column only once
▪ Pivot on a one if possible
▪ Pivot on the main diagonal
MODULE 2 – Matrices and Determinants 13
Engr. Caesar P. Llapitan
Since there is no one in the first row, we have two options: Either we divide the first row by
three and work with fractions, or we pivot on the three and get large numbers. You have the
option to use. Let us pivot on the three in R1C1. Go ahead and circle that as the pivot element.
x y z rhs
*3 2 -4 3
2 3 3 15
5 -3 1 14
The idea is to make the boxed (yellow) numbers into zero. Using the combined row
operation (this is not an elementary operation), that could be done by 3R2 - 2R1 → R2 and 3R3 -
5R1 → R3.
The only row not being changed is the row containing the pivot element (the 3). The whole
point of the pivot process is to make the boxed values into zero. Go ahead and rewrite the pivot
row and clear (make zero) the pivot column.
x y z rhs
*3 2 -4 3
0
0
To replace the values in row 2, each new element is obtained by multiplying the element
being replaced in the second row by 3 and subtracting 2 times the element in the first row from
the same column as the element being replaced.
x y z rhs
*3 2 -4 3
2 3 3 15
5 -3 1 14
pivot column, clear 0 3(-3) - 5(2) = -19 3(1) - 5(-4) = 23 3(14) - 5(3) = 27
MODULE 2 – Matrices and Determinants 14
Engr. Caesar P. Llapitan
Or, if you remove the comments, the matrix after the first pivot looks like this.
x y z rhs
3 2 -4 3
0 5 17 39
0 -19 23 27
It is now time to repeat the entire process. We go through and pick another place to pivot.
We would like it to be on the main diagonal, a one, or have zeros in the column. Unfortunately,
we can't have any of those. But since we have to multiply all the other numbers by the pivot, we
want it to be small, so we'll pivot on the 5 in R2C2 and clear out the 2 and -19.
x y z rhs
3 2 -4 3
0 *5 17 39
0 -19 23 27
Begin by copying down the pivot row (2nd row) and clearing the pivot column (2nd
column). Previously cleared columns will remain cleared.
x y z rhs
0
0 *5 17 39
0 0
Here are the calculations to find the next iteration. Pay careful attention to the 3rd row
where we're subtracting -19 times a value. Since we're subtracting a negative, I went ahead and
wrote it as plus 19.
x y z rhs
5(3) - 2(0) = 15 pivot column, clear 0 5(-4) - 2(17) = -54 5(3) - 2(39) = -63
pivot row, copy 0 pivot row, copy 5 pivot row, copy 17 pivot row, copy 39
previously cleared 0 pivot column, clear 0 5(23) + 19(17) = 438 5(27) + 19(39) = 876
Notice that all the elements in the first row are multiples of 3 and all the elements in the last
row are multiples of 438. We'll divide to reduce the rows.
MODULE 2 – Matrices and Determinants 15
Engr. Caesar P. Llapitan
x y z rhs
5 0 -18 -21
0 5 17 39
0 0 1 2
That had the added benefit of giving us a 1, exactly where we want it to be to pivot. So, we'll
pivot on the 1 in R3C3 and clear out the -18 and 17. Circle your pivot and box the other numbers
in that column to clear.
x y z rhs
5 0 -18 -21
0 5 17 39
0 0 *1 2
Copy down the pivot row and clear the pivot column. Previously cleared columns will
remain cleared as long as you don't pivot in a row or column twice.
x y z rhs
0 0
0 0
0 0 *1 2
Notice that each time there are fewer calculations to perform. Here are the calculations for
this pivot. Again, since the value in the pivot column in the first row is -18 and we're subtracting,
then it is written as + 18.
x y z rhs
1(5) +18(0)= 5 previously cleared 0 pivot column, clear 0 1(-21) + 18(2) = 15
previously cleared 0 1(5) - 17(0) = 5 pivot column, clear 0 1(39) - 17(2) = 5
pivot row, copy 0 pivot row, copy 0 pivot row, copy 1 pivot row, copy 2
Notice that the first and second rows are multiples of 5, so we can reduce those rows.
x y z rhs
1 0 0 3
0 1 0 1
0 0 1 2
MODULE 2 – Matrices and Determinants 16
Engr. Caesar P. Llapitan
And the final answer is x = 3, y = 1, and z = 2. You can also write that as an ordered triplet {(3, 1,
2)}.
Summary
▪ Pick your pivot element wisely.
▪ Picking a column with zeros in it means less pivoting.
▪ Picking a one as the pivot makes the numbers smaller, the multiplication easier, and
leaves the non-zero elements in a cleared column the same (less pivoting)
▪ Pivoting on the main diagonal means you won't have to switch rows to put the matrix
into reduced row-echelon form.
▪ Do not pivot on a zero.
▪ Do not pivot on the right-hand side.
▪ Only use a row or column once
▪ Take the product with the pivot minus the product without the pivot
Types of Solutions
There are three types of solutions which are possible when solving a system of linear
equations
Independent
▪ Consistent
▪ Unique Solution
▪ A row-reduced matrix has the same number of non-zero rows as variables
▪ The left-hand side is usually the identity matrix, but not necessarily
▪ There must be at least as many equations as variables to get an independent solution.
x y z rhs
1 0 0 3
0 1 0 1
0 0 1 2
When you convert the augmented matrix back into equation form, you get x = 3, y = 1, and z =
2.
Dependent
▪ Consistent
▪ Many solutions
▪ Write answer in parametric form
▪ A row-reduced matrix has more variables than non-zero rows
▪ There doesn't have to be a row of zeros, but there usually is.
▪ This could also happen when there is less equation than variables.
x y z rhs
1 0 3 4
0 1 -2 3
0 0 0 0
Inconsistent
▪ No Solution
▪ A row-reduced matrix has a row of zeros on the left side, but the right-hand side
isn't zero.
x y z rhs
1 0 3 4
0 1 -2 3
0 0 0 2
There is no solution here. You can write that as the null set Ø, the empty set { }, or no solution.
Examples:
2
1. A = 8 At = 2 8 9
9
1 2 0 1 2 0
2. B = 2 1 0 B = 2 1 0
t
symmetric matrix
0 0 1 0 0 1
0 1
0 2 1
3. C = 2 4 Ct =
1 −1 1 4 −1
Properties of Transpose
If A and B are matrices (with orders such that the given matrix operations are defined) and
c is a scalar, then the following are true:
1. (A ) t t
=A
2. ( A + B )t = At + Bt Transpose of sum
3. ( cA )t = c ( At ) Transpose of a scalar multiple
4. ( AB )t = Bt At Transpose of a product
( ABC )t = C t Bt At
MODULE 2 – Matrices and Determinants 18
Engr. Caesar P. Llapitan
Examples:
Given
2 1 −2 3 1
A = −1 0 3 and B = 2 −2
0 −2 1 3 0
2 1 −2 3 1 2 1
AB = −1 0 3 2 −2 = 6 −1
0 −2 1 3 0 −1 2
2 6 −1
( AB )t =
1 −1 2
2 −1 0
3 2 3 2 6 −1
B A =
t t
1 0 −2 =
1 −2 0 −2 3 1 1 −1 2
The inverse of a square matrix A, denoted by A-1, is the matrix so that the product of A and
A-1 is the Identity matrix. The identity matrix that results will be the same size as the matrix A.
A(A-1) = I or A-1(A) = I
There are a couple of exceptions, though. First of all, A-1 does not mean 1/A. Remember,
"There is no Matrix Division!" Secondly, A-1 does not mean take the reciprocal of every element
in the matrix A.
A square matrix that has an inverse is called invertible or non-singular. A matrix that does
not have an inverse is called singular.
A matrix does not have to have an inverse, but if it does, the inverse is unique.
2. (A ) = A A A
k −1 −1 −1 −1
A −1 ; that is, k factor
3. ( cA ) = c1 A ; c 0
−1 −1 −1
4. (A ) =(A )
t −1 −1 t
MODULE 2 – Matrices and Determinants 19
Engr. Caesar P. Llapitan
Example:
Find A-1 given that
1 −1 0
A = 1 0 −1
−6 2 3
Solution:
1 −1 0 1 0 0
A I = 1 0 −1 0 1 0
−6 2 3 0 0 1
▪ ( −1 m1 ) + m2 = new m2
1 −1 0 1 0 0
0 1 −1 −1 1 0
−6 2 3 0 0 1
▪ ( 6 m1 ) + m3 = new m3
1 −1 0 1 0 0
0 1 −1 −1 1 0
0 −4 3 6 0 1
▪ ( 4 m2 ) + m3 = new m3
1 −1 0 1 0 0
0 1 −1 −1 1 0
0 0 −1 2 4 1
▪ −1 m3 = new m3
1 −1 0 1 0 0
0 1 −1 −1 1 0
0 0 1 −2 −4 −1
▪ m3 + m2 = new m2
MODULE 2 – Matrices and Determinants 20
Engr. Caesar P. Llapitan
1 −1 0 1 0 0
0 1 0 −3 −3 −1
0 0 1 −2 −4 −1
▪ m2 + m1 = new m1
1 0 0 −2 −3 −1
I A −1 0 1 0 −3 −3 −1
0 0 1 −2 −4 −1
Therefore,
−2 −3 −1
A −1
= −3 −3 −1
−2 −4 −1
Step 1, switch the elements on the main diagonal would involve switching the 5 and 7.
5 -2
3 7
Step 2, take the opposite of the other two elements, but leave them where they are.
5 2
-3 7
Step 3, find the determinant and divide every element by that. The determinant is the product
of the elements on the main diagonal minus the product of the elements off the main diagonal.
That means the determinant of this matrix is 7(5) - (-3)(2) = 35 + 6 = 41. We divide every element
by 41.
There is no division by a matrix. You may multiply or divide a matrix by a scalar (real
number) and the determinant is a scalar.
Now, pre-multiply both sides by the inverse of A. Make sure you meet these two conditions.
1. You must place the inverse of the matrix adjacent to the matrix. That is because Inverses
need to be next to each other (very loose mathematically, but think back to functions)
in order to undo each other.
2. If you multiply by putting something in front of the left side (pre-multiply), it has to go
in front of the right side. If you put something behind (post-multiply) the left side, it has
to go behind the right side.
▪ A −1 ( AX ) = A −1 ( B ) pre-multiply both sides by A−1
▪ ( A A) X = A
−1 −1
B use the associative property to regroup factors
▪ I X = A−1 B when you multiply inverses together, they become the identity
matrix
▪ X = A−1 B the identity matrix is like multiplying by 1.
If AX = B, then X = A−1 B
( AB )−1 = B −1 A−1
3x + 2y - 5z = 12
x - 3y + 2z = -13
5x - y + 4z = 10
12
-13
10
Verify that AX = B
This step isn't really needed, but I wanted to show you that this thing really does work.
AX will be a (3×3) × (3×1) = 3×1 matrix. The B matrix is also a 3×1 matrix, so at least the dimensions
work out right.
Here's A times X.
3 2 −5 x 3 x + 2 y − 5 z
1 −3 2 y = 1 x − 3 y + 2 z
5 −1 4 z 5 x − 1 y + 4 z
Notice that turns out to be the left side of the system of equations. The B is the right-hand
side, so we have achieved equality. You can write a system of linear equations as AX = B.
So, if you can write a system of linear equations as AX = B where A is the coefficient matrix,
X is the variable matrix, and B is the right-hand side, you can find the solution to the system by
X = A−1 B .
Place the coefficient matrix into [A] on the calculator and the right-hand side into [B].
If you asked the calculator to find the inverse of the coefficient matrix, it would give you this for
A−1 .
5 / 44 3 / 88 1 / 8
−3 / 44 −37 / 88 1 / 8
−7 / 44 −13 / 88 1 / 8
You could do that, and then multiply that by B, but it would be easier just to put the whole
expression into the calculator and get the answer directly. Even what is shown below is more
work than is necessary.
X = A−1 B
x 5 / 44 3 / 88 1 / 8 12 191 / 88
y = −3 / 44 −37 / 88 1 / 8 −13 = 519 / 88
z −7 / 44 −13 / 88 1 / 8 10 111 / 88
A determinant is a real number associated with every square matrix. The determinant of a
square matrix A is denoted by "det A" or [ A ].
3 1 3 1
= Det
5 2 5 2
Determinant of a 2 × 2 Matrix
The determinant of a 2 × 2 matrix is found much like a pivot operation. It is the product of
the elements on the main diagonal minus the product of the elements off the main diagonal.
a b
= ad − bc
c d
Properties of Determinants
▪ The determinant is a real number, it is not a matrix.
▪ The determinant can be a negative number.
▪ It is not associated with absolute value at all except that they both use vertical lines.
▪ The determinant only exists for square matrices (2×2, 3×3 ... n×n). The determinant of a
1×1 matrix is that single value in the determinant.
▪ The inverse of a matrix will exist only if the determinant is not zero.
Minors (Mij)
A minor for any element is the determinant that results when the row and column of that
element are deleted.
The notation Mij is used to stand for the minor of the element in row i and column j. So M21
would mean the minor for the element in row 2, column 1.
Consider the 3×3 determinant shown below. I've included headers so that you can keep the
rows and columns straight, but you wouldn't normally include those. We're going to find some
of the minors.
C1 C2 C3
R1 1 3 2
R2 4 1 3
R3 2 5 2
C2 C3
R1 3 2
= 3(2) - 5(2) = 6 - 10 = -4
R3 5 2
MODULE 2 – Matrices and Determinants 24
Engr. Caesar P. Llapitan
As you can see, the minor for row 2 and column 1 is M21 = -4.
C1 C3
R1 1 2
= 1(3) - 4(2) = 3 - 8 = -5
R2 4 3
Matrix of Minors
The matrix of minors is the square matrix where each element is the minor for the number
in that position.
C1 C2 C3
R1 M11 M12 M13
R2 M21 M22 M23
R3 M31 M32 M33
Let's find the matrix of minors for our original determinant. Here is the determinant.
C1 C2 C3
R1 1 3 2
R2 4 1 3
R3 2 5 2
C1 C2 C3
1 3 4 3 4 1
R1 5 2 2 2 2 5
= 2 - 15 = -13 =8-6=2 = 20 - 2 = 18
3 2 1 2 1 3
R2 5 2 2 2 2 5
= 6 - 10 = -4 = 2 - 4 = -2 = 5 - 6 = -1
3 2 1 2 1 3
R3 1 3 4 3 4 1
=9-2=7 = 3 - 8 = -5 = 1 - 12 = -11
MODULE 2 – Matrices and Determinants 25
Engr. Caesar P. Llapitan
Finally, here is the matrix of minors. Again, you don't need to put the labels for the row and
columns on there, but it may help you.
C1 C2 C3
R1 -13 2 18
R2 -4 -2 -1
R3 7 -5 -11
Cofactors
The cofactor cij is given by
i+ j
cij = ( −1 ) Mij
A cofactor for any element is either the minor or the opposite of the minor, depending on
where the element is in the original determinant.
▪ If the row and column of the element add up to be an even number, then the cofactor is
the same as the minor.
▪ If the row and column of the element add up to be an odd number, then the cofactor is
the opposite of the minor.
Sign Chart
Here is the sign chart for a 2×2 determinant.
C1 C2
R1 + -
R2 - +
C1 C2 C3
R1 + - +
R2 - + -
R3 + - +
Matrix of Cofactors
The matrix of cofactors is the matrix found by replacing each element of a matrix by its
cofactor. This is the matrix of minors with the signs changed on the elements in the C -
positions.
C1 C2 C3
R1 -13 -2 18
R2 4 -2 1
R3 7 5 -11
n
A= aijCij = ai 1Ci 1 + ai2Ci2 + ai 3Ci 3 + + ainCin (ith row expansion)
j =1
n
A= aijCij = a1 jC1 j + a2 jC2 j + a3 jC3 j + + anj Cnj (jth column expansion)
i =1
Examples:
1. Determine the determinant of the matric by cofactor expansion along the first row.
1 3 2
4 1 3
2 5 2
Solution:
From the sign chart, we see that 1 is in a positive position, 3 is in a negative position and 2 is
in a positive position. By putting the + or - in front of the element, it takes care of the sign
adjustment when going from the minor to the cofactor.
1 3 4 3 4 1
+1 -3 +2
5 2 2 2 2 5
= 1 ( 2 - 15 ) - 3 ( 8 - 6 ) + 2 ( 20 - 2 )
= 1 ( -13 ) - 3 ( 2 ) + 2 (18)
= -13 - 6 + 36
= 17
Let's try it again, but this time expands on the second columns. As an effort to save time,
the minors for that column (from the matrix of minors) were 2, -2, and -5. The original
elements were 3, 1, and 5. The 3 and 5 are in negative positions.
However, you can't do diagonals. If we try the main diagonal, you get
Solution:
Expanding along the third column
A = 3C13 + 0C23 + 0C33 + 0C43
−1 1 2 −1 1 2
C13 = ( −1 )
1 +3 0 2 3 = 0 2 3
3 4 −2 3 4 −2
Therefore, A = 3 ( 13 ) = 39
c11 c12 c1 n
c c22 c2n
21
cm1 cm2 cmn
The transpose of this matrix is called the adjoint A and is denoted by Adj (A). That is
Example:
Find the adjoint of
MODULE 2 – Matrices and Determinants 28
Engr. Caesar P. Llapitan
−1 3 2
A = 0 −2 1
1 0 −2
Solution:
−2 1 0 1 0 −2
+ − +
0 2 1 −2 1 0
3 4 1 2
2 −1 2 −1 3
Cofactors of A = − + − = 6 0 3
0 −2 1 −2 1 0
7 1 2
+ 3 2 −1 2 −1 3
− +
−2 1 0 1 0 −2
4 6 7
Adj (A) = 1 0 1
2 3 2
Inverse of a Matrix
Let's consider our original determinant as a matrix this time.
1 3 2
4 1 3
2 5 2
−13 2 18
−4 −2 −1
7 −5 −11
Turn it into a matrix of cofactors by changing the signs on the appropriate elements based
on the sign chart.
−13 -2 18
4 −2 1
7 5 −11
To transpose a matrix, you switch the rows and columns. That is, the rows become columns
and the columns become rows.
−13 4 7
−2 −2 5
18 1 −11
MODULE 2 – Matrices and Determinants 29
Engr. Caesar P. Llapitan
Finally divide the adjoint of the matrix by the determinant of the matrix. In this problem,
the determinant is 17, so we'll divide every element by 17. The resulting matrix is the inverse of
the original matrix.
−13 / 17 4 / 17 7 / 17
−2 / 17 −2 / 17 5 / 17
18 / 17 1 / 17 −11 / 17
The inverse of a matrix is found by dividing the adjoint of the matrix by the determinant of
the matrix. If you check it with your calculator, you can verify that the inverse actually is the
adjoint divided by the determinant.
Since the inverse is the adjoint divided by the determinant, we can see why the inverse
doesn't exist if the determinant is zero. That would cause division by zero, which is undefined.
C1 C2 C3 C4
R1 3 2 0 1
R2 4 0 1 2
R3 3 0 2 1
R4 9 2 3 1
Pick the row or column with the most zeros in it. In this case, that is the second column.
For each element in the original matrix, its minor will be a 3×3 determinant. We'll have to
expand each of those by using three 2×2 determinants.
This is why we want to expand along the second column. The minors are multiplied by their
elements, so if the element in the original matrix is 0, it doesn't really matter what the minor is
and we can save a lot of time by not having to find it. In the second column, you won't need to
find two of the minors because their corresponding element in the second column is zero.
4 1 2 3 0 1
−2 3 2 1 +0 ? −0 ? +2 4 1 2
9 3 1 3 2 1
We could actually fill in those middle two minors, but since they're multiplied by 0, it
doesn't really matter what they are. In fact, you could just as easily skip them. Now, there are
two 3x3 determinants left to find.
In the first 33 determinant, there are no zeros, so pick the row or column with the largest
numbers. That would be column 1, so expand along the first column.
Notice the 4 is in a positive position. The sign charts begin over with each new determinant.
The position of the number in the original matrix does not matter, only its position in the
current matrix.
MODULE 2 – Matrices and Determinants 30
Engr. Caesar P. Llapitan
4 1 2
2 1 1 2 1 2
3 2 1 = +4 −3 +9 = 4 ( 2 − 3 ) − 3 ( 1 − 6 ) + 9 ( 1 − 4 ) = − 16
3 1 3 1 2 1
9 3 1
Consider the other 3×3 matrix. In this one, there is a 0 in the row 1 and column 2. Either one
of those would be a good pick for expansion, but since row 1 has slightly larger numbers, we'll
expand along the first row.
3 0 1
1 2 ? ? 4 1
4 1 2 = +3 −0 −1 = 3 ( 1 − 4 ) − 0 ( doesn't matter ) + 1 ( 8 − 3 ) = − 4
2 1 ? ? 3 2
3 2 1
When you go to find the determinant, remember that there were elements from the original
4×4 matrix that were times each of those 3×3 determinants. The first one was -2 and the second
one was +2.
Diagonal Matrix
A diagonal matrix is one in which all the non-zero elements are on the main diagonal.
Everything off the main diagonal is a zero. The determinant of a triangular matrix or a diagonal
matrix is the product of the elements on the main diagonal.
2 −3 10
A= 1 2 −2
0 1 −3
Solution:
Rewrite A in triangular form.
a. Interchange m1 and m2
1 2 −2
= − 2 −3 10
0 1 −3
c. Factor out -7 of m2
1 2 −2
= 7 0 −1 2
0 1 −3
A = 7 ( 1 )( 1 )( −1 ) = − 7
Examples:
1.
2 1 −3 1 2 −3
4 0 1 =−0 4 1
0 0 2 0 0 2
−1 2 2
A= 3 −6 4
5 −10 −3
Solution:
(2 n1) + n2 = new n2
MODULE 2 – Matrices and Determinants 32
Engr. Caesar P. Llapitan
−1 0 2
= 3 0 4
5 0 −3
Remember, that a matrix is invertible, non-singular, if and only if the determinant is not
zero. So, if the determinant is zero, the matrix is singular and does not have an inverse.
Examples:
0 0 0 1 −2 4 1 2 −3
1. 2 4 −5 = 0 0 1 2 =0 2 −1 −6 = 0
3 −5 2 1 −2 4 −2 0 6
Solution:
-2 m1 + m2 = new m2
1 4 1
A = 0 −9 −2 = 0
0 18 4
Solution:
Step 1:
2 n1 + n3 = new n3
−3 5 4
A = 2 −4 3
−3 0 0
Step 2:
Expanding by co-factor along the 3rd row
MODULE 2 – Matrices and Determinants 33
Engr. Caesar P. Llapitan
5 −4
A = ( −3 )( −1 )
4
−4 3
= − 3 ( 15 − 16 )
=3
1
A−1 =
A
4. Determinant of a transpose
If A is a square matrix, then
A = At
Cramer's Rule
Solve the system of linear equations
3x + 5y = 12
2x - 4y = 9
Let Dx be the determinant of the coefficient matrix where the x column has been replaced
by the constants from the right-hand side.
MODULE 2 – Matrices and Determinants 34
Engr. Caesar P. Llapitan
rhs y
12 5
Dx = = - 93
9 -4
Let Dy be the determinant of the coefficient matrix where the y column has been replaced
by the constants from the right-hand side.
x rhs
3 12
Dy = =3
2 9
As long as D, the determinant of the coefficient matrix, is not 0, then x = Dx/D and y = Dy/D.
In this case, D = -22, so Cramer's Rule will work and
o Cramer's rule is named after Gabriel Cramer who lived from 1704 - 1752. He is not the
one who developed the technique originally, however, as the Chinese were known to
have used the method before him.
For a 3×3 system then let Dz be the determinant of the coefficient matrix where the z column
has been replaced by the constants from the right-hand side.
either the ith row or the jth column by aij and then balancing by multiplying the
determinant also by aij .
2. Cross out the row and column through aij .
3. From each element of the resulting determinant of order n – 1, subtract the product of
the elements in which the row and column containing aij are not met by the row and
column containing that element.
i+ j
4. Then the value of the determinant is ( −1 ) times the value of the new determinant.
Example:
3 −2 4 2
2 1 −3 5
D=
−4 0 −1 −2
−5 3 2 4
Solution:
3 -2 4 2
2 1 -3 5
D =
-4 0 -1 -2
-5 3 2 4
7 -2 12
D = -4 -1 -2
-11 11 -11
7 -2 12
D = 11 -4 -1 -2
-1 1 -1
7 – (-2)(-1) 12 – (-2)(-1)
D = 11(-1)5
-4 – (-1)(-1) -2 – (-1)(-1)
5 10
D = - 11
-5 -3
Therefore,
D = -(11)[-15 + 50] = -385
Exercises
I. What is the row-echelon form of a matrix? What is a leading entry?
II. (a) What is the augmented matrix of a system? What are leading variables?
(b) What are the elementary row operations on an augmented matrix?
MODULE 2 – Matrices and Determinants 36
Engr. Caesar P. Llapitan
III. Suppose you have used Gaussian elimination to transform the augmented matrix of a linear
system into row-echelon form. How can you tell whether the system has exactly one
solution? no solution? infinitely many solutions?
Let
1 2 4
A = 2 0 −1 B=
−2 1 0
1 / 2 3 1 4
C = 2 3 / 2
D = 0 −1
−2 1 2 0
MODULE 2 – Matrices and Determinants 37
Engr. Caesar P. Llapitan
4 0 2
2 −1
E = F = −1 1 0 G = 5
−1 / 2 1 7 5 0
2 1 1 −2 0 1 3
A= B= C =
3 2 −2 4 −2 4 0
1. A + 3X = B
2. 2(X − A) = 3B
3. AX = B
3 0 1
1. 2 −4 0
4 −2 1
1 0 0 1
0 2 0 2
2.
0 0 3 3
0 0 0 4
2 −3 4 −2
3 4 2 5
3.
−5 −2 3 −4
−3 2 0 −5