MATRICES
MATRICES
MATRICES
WHY SHOULD YOU KNOW ABOUT MATRICES?
You solved two equations in two unknowns in previous mathematics courses, but real
engineering problems usually involve a large number of equations. For example, electrical
networks may have a large number of equations in many unknowns. By "storing" these
equations in matrix form a computer may be used to solve the unknowns. In order to
determine the correctness of the solutions you need to do some of the calculations by hand
and thus you need to understand the theory of matrices.
In this chapter we will look at definitions and two matrix methods to solve systems of linear
equations.
OUTCOME
Use matrices to solve problems involving systems of linear equations
ASSESSMENT CRITERIA
By the end of this chapter you must be able to
1. Represent a system of linear equations in matrix form
2. Evaluate 2 × 2 and 3 × 3 determinants
3. Multiply a matrix by a scalar
4. Add, subtract and multiply matrices
5. Determine cofactors and minors
6. Determine the adjoint matrix of a given matrix
7. Determine the inverse matrix using the definition and/or the adjoint matrix
8. Solve a system of two or three linear equations using matrix inversion
9. Solve a system of two or three linear equations using Cramer’s rule
TERMINOLOGY
At the end of this chapter you must be able to explain and use the following concepts.
Adjoint matrix Adjugate matrix Antisymmetric matrix
Augmented matrix Cofactor Coefficient determinant
Coefficient matrix Column Constant matrix
Cramer’s rule Diagonal expansion Diagonal matrix
Determinant Dimension Equal matrices
Element Entry Expansion
Homogeneous Identity matrix Inhomogeneous
1
Inverse matrix Linear equation Linear system
Lower triangular matrix Matrix Matrix equation
Matrix inversion Minor Minor determinant
Negative of a matrix Nonhomogeneous Non-singular matrix
Order Place sign Place sign table
Principal diagonal Row Scalar
Scalar multiplication Secondary diagonal Singular matrix
Size Skew-symmetric matrix Square matrix
Symmetric matrix Trace Transpose
Trivial solution Unique solution Unit matrix
Upper triangular matrix Vector Zero matrix
TIME ALLOCATION
Approximately 8 hours
EXERCISES
Exercise 11(a), pp. 515-516; Exercise 11(b), pp. 521-522; Exercise 11(c), pp. 533-534;
Miscellaneous exercise 12, pp. 563-566, numbers 1, 2, 3, 4, 5, 6, 13, 14, 15, 16, 17, 20
K In these notes the brackets [] were used to indicate matrices and the lines *A* for
determinants. The textbook uses ( ) for matrices and det(A) for determinants. Make sure
you understand the various notations!
ACTIVITY 2.1 NN
1. Solve for x and y using any valid mathematical method.
2
5. Solve for x and y using any valid mathematical method.
6. Take another look at your solutions. What played a bigger role in the actual solution: the
constants on the right, the coefficients of the variables or the variables themselves?
OOOO
Based on our observations we will concentrate on the coefficients of the variables when
solving systems. We will arrange these coefficients in a specific format, i.e. a rectangular
array, called a matrix. For example, we will write the coefficients in
as
For example,
and
are all rectangular arrays of numbers and are therefore matrices. Each number in a matrix is
known as an element or entry of the matrix. The horizontal lines are called rows and the
vertical lines are called columns.
To describe the size or order or dimension of a matrix, we state its number of rows and
columns. Matrix B has three rows and two columns, and is said to be a ‘three-by-two’ matrix,
written as . Matrix C is a matrix.
K The first integer in the size always gives the number of rows in the matrix and the
second integer the number of columns.
We will use an upper-case letter to refer to a matrix and lowercase letters for its elements. A
double-subscript is used to indicate the position of the element in a matrix. The first
subscript refers to the row in which the element lies, and the second subscript to the column
in which the element lies. Therefore, refers to the element in row 2 and column 4 of
matrix A. In general, if A is a matrix, we can write
3
K It is not necessary for the number of rows and columns to be the same.
Square matrix: A matrix in which the number of rows equals the number of columns.
For example, A defined by
is a square matrix. Since the number of rows equals the number of columns, we say the
A is of order 2 or A is two-dimensional.
Row vector/matrix: A matrix with only one row. For example, C defined by
is a 1 × 3 row vector.
Column vector/matrix: A matrix with only one column. For example, D defined by
is a 3 × 1 column vector.
Zero matrix: All the elements in the matrix are zero. For example,
is a 2 × 3 zero matrix.
4
Secondary diagonal: The diagonal in a square matrix running from top right to bottom
left. In A the secondary diagonal is .
Trace: The sum of the elements in the main diagonal. The trace of A is 11.
Diagonal matrix: A square matrix with zeros everywhere except on the principal
diagonal. For example,
Upper triangular matrix: Every element below the principal diagonal is zero as in F.
Lower triangular matrix: Every element above the principal diagonal is zero as in G.
, then .
5
Symmetric matrix: A square matrix A and its transpose AT are identical. For example,
is skew-symmetric since
Inverse of a matrix: If A is a square matrix and we can find another matrix B with the
property that
,
then B is said to be the inverse of A, written as A-1, that is
.
We will have a closer look at the inverse in a later section.
K A-1 does not mean a reciprocal; there is no such thing as matrix division.
then
ACTIVITY 2.2 NN
Consider the following matrices.
6
Write down the following.
1. The transpose of B 2. DT
3. The negative of C 4. -A
5. The principal diagonal of D 6. The secondary diagonal of A
7. A fourth order identity matrix 8. A 2 × 2 zero matrix
9. The trace of D 10. The dimensions of B and C
11. The name of a column matrix 12. Any third order diagonal matrix
13. The size of A and E 14. The elements d23 and c12
OOOO
Equal matrices: Two matrices A and B are equal if and only if their corresponding
elements are equal. That is, if , then the two matrices will have the same number
of rows, the same number of columns and for all i and j.
The matrices
are not equal since the corresponding elements in the third column are not the same.
7
EXAMPLE 2.1
If
then
Properties of addition:
If A, B and C are matrices, then
1. (commutative law)
2. (associative law)
3. where 0 is an zero matrix
4. where 0 is the zero matrix
For example, if
then
ACTIVITY 2.3 NN
1. Given
, and .
8
Find, if possible,
1.1 A+B 1.2 2A 1.3 B + 2C 1.4 B-A
1.5 2(A - B) 1.6 ¾A + ½B
2. Determine the value of the unknowns in each of the given matrix equalities.
2.1 2.2
2.3 2.4
OOOO
ACTIVITY 2.4 NN
In the following, determine if AB and BA are defined. For whichever products are defined,
give the dimensions of the product matrix.
1. A is 14 × 21 and B is 21 × 14
2. A is 18 × 4 and B is 18 × 4
3. A is 6 × 22 and B is 4 × 6
4. A is 1 × 3 and B is 3 × 3
5. A is 7 × 6 and B is 7 × 7
OOOO
9
The product of two matrices is found as follows: If
then
EXAMPLE 2.2
SOLUTION
Matrix A has two columns and matrix B has two rows. It is therefore possible to find C.
A has two rows and B has two column so that C has size .
or, in a diagram, write the matrices as shown. To find the product, let your fingers move
along the arrows.
EXAMPLE 2.3
Find, if possible, AB and BA where
SOLUTION
It is possible to find AB since A has two columns and B has two rows. The product is a
matrix. Thus,
10
It is, however, not possible to determine BA since B has two columns and A has three
rows. U
but
but
ACTIVITY 2.5 NN
1. Find the following product if it is defined.
11
1.1 1.2
1.3 1.4
1.5 1.6
1.7 1.8
2. Determine A2 if .
OOOO
EXERCISE 2.1
1. Evaluate, if possible.
1.1 1.2
1.3 1.4
1.5 1.6
1.7 1.8
1.9 1.10
12
2. Is where A and B are matrices? Motivate your answer
using the following matrices.
3. Find x and y if
3.1 3.2
2.3 DETERMINANTS
the determinant is
is
K Vertical lines are used for determinants and brackets for matrices. The lines in does
not indicate absolute values!
13
2.3.2 FIRST AND SECOND ORDER DETERMINANTS
If A is a matrix , then . For example, if , then
(and not +21).
If A is a matrix
then
EXAMPLE 2.4
If , then .
If , then . U
ACTIVITY 2.6 NN
Find
1. 2.
3. 4.
5. 6.
14
7. 8.
OOOO
Minor: If we choose an element of A and cross out its row and column and form the
determinant of the remaining elements, this determinant is known as the minor
determinant or minor of that element. For example, the minor of a11 is
To find the minor of 3, cancel the row and the column with the 3 in.
15
Place sign table
EXAMPLE 2.5
Find the cofactors of 9 and 7 in
SOLUTION
column. Compare this position to the place sign table or calculate . The
place sign is negative and the cofactor is -11.
The cofactor of 1 is +8, the cofactor of 3 is -2, the cofactor of 2 is -3 and the cofactor of
8 is +1. The matrix of cofactors is thus
K Compare the elements of A and its adjoint matrix. The elements 1 and 8 changed
16
position, while the signs of 2 and 3 changed in the adjoint. Thus, in general, if
, then .
Å This method to determine the adjoint matrix works for 2 × 2 matrices only!
ACTIVITY 2.7 NN
1. Given .
3.1 3.2
OOOO
Using cofactors
The value of a third order determinant is the sum of three products obtained by multiplying
each element of any row (or each element in any column) by its cofactor. Let's apply this
statement to an example.
and let’s find by expansion along the first row. This means we will multiply each
element in row 1 by its cofactor, that is,
so that
17
Now we determine by expansion along the second column, that is, multiply each
element in column 2 by its cofactor. Thus,
Thus,
K The value of a given determinant is the same no matter which row or column we choose
to use for the expansion. We usually choose the row or column with the most zeros to
simplify calculations.
K If the determinant of a matrix is zero, then the matrix is singular and its inverse does
not exist.
ACTIVITY 2.8 NN
1. Evaluate by expanding by
2.1 2.2
OOOO
Diagonal expansion
The method using cofactors works for determinants of any order. There is an alternative
method for evaluating third order determinants. The steps are as follows:
C Rewrite the elements of the determinant
C Repeat on the right the first two columns of the determinant
C Add the signed products of the elements on the various diagonals
18
Adding along the diagonal yields
.
Thus,
ACTIVITY 2.9 NN
1. Repeat Activity 2.8, but now using diagonal expansion.
2. Determine
EXERCISE 2.2
1. Evaluate the following determinants.
19
1.1 1.2
1.3 1.4
1.5 1.6
1.7 1.8
1.9 1.10
There are several methods we can use to determine these inverse matrices; we will look at
only two methods.
20
2.4.1 USING THE DEFINITION
Let
From the definition of equal matrices we have four equations in four unknowns:
We can solve this system of linear equations using any valid method. The result is
.
Thus
This method can also be used on higher order matrices, although the calculations may become
awful!
ACTIVITY 2.10 NN
Determine the inverse, if it exists, of each of the following matrices.
1. 2.
OOOO
21
The minor of the 2 is The place sign of 2 is +; thus the cofactor of 2 is +8.
with transpose
ACTIVITY 2.11 NN
1. Find the inverse of the matrices in Activity 2.10 using adjoint matrices.
2.1 2.2
OOOO
EXERCISE 2.3
1. Find A-1 if it exists.
1.1 1.2
1.3 1.4
1.5 1.6
1.7 1.8
22
1.9 1.10
where
We thus have
Multiplication yields
23
A= matrix of the coefficients, called the coefficient matrix
X= (column) matrix of variables
B= (column) matrix of constants, called the constant matrix
The augmented matrix Ab is a combination of the coefficient matrix and constant
matrix, that is
A system such as
is called a system of linear equations or a linear system since both equations are linear. But
what is a "linear equation"? A linear equation in x1, x2, ..., xn has the general form
K Note that the exponents of all the variables are one. The equation is
In order to use the methods for solving linear systems described later we need to write a
system of equations in matrix form. As mentioned before, the position of an element is of the
utmost importance. Therefor the first step is to rearrange the given system so that the
unknowns are in a specific order and to fill in zeros where unknowns are not present. For
example, the system
should be rewritten as
24
nonhomogeneous.
Case 1: and
Since , we know that A-1 exists so that
or
and the system of equations has an unique solution that is, one solution only.
Case 2: and
Again A-1 exists and
or
.
Thus, the system of equations has only the trivial solution , that is, all variables
are equal to zero.
Case 3: and
A-1 doesn't exist and we have either infinitely many solutions or no solution. You will
learn more about this case in a later course.
ACTIVITY 2.12 NN
1. Write down the system of linear equations if and
1.1
1.2
1.3
2. Will any of the matrix equations above have an unique solution? Show all calculations
to motivate your answer.
25
3.1 3.2
4.1 4.2
4.3
OOOO
or
Let
K and not .
26
THEOREM Let A be an n × n matrix. The system has a solution if
and only if A is non-singular. In this case the unique solution is .
EXAMPLE 2.6
Solve the following system of equations, using the theorem.
SOLUTION
From the system we have
. U
This method is not very popular with computer programmers because of the need to find the
inverse matrix first. Then they have to perform matrix multiplication which need additional
computations, and as a result the method is not time-economic.
ACTIVITY 2.13 NN
Solve the variables using matrix inversion if
1. 2.
3. 4.
OOOO
Cramer's rule:
Given the system
27
with
then
and .
If D 0, then the system has exactly one solution which is given by Cramer's rule. If D = 0,
the system is either inconsistent and has no solution or dependent and has infinitely many
solutions.
EXAMPLE 2.7
Solve for a and c if
SOLUTION
Let
then
To solve a, substitute the first column by the column of constants and calculate a.
To find c, we can use Cramer’s rule again. It is, however, much easier to substitute a in
any one of the equations and then solve for c. Thus,
so that
. U
EXAMPLE 2.8
Two investments totalling R18 000 yield an annual income of R700. If the first investment
has an interest rate of 5.5% and the second a rate of 3.0%, what is the value of each
investment?
SOLUTION
Let x = the value of the first investment and y = the value of the second investment. We
know the total investment is R18 000. This leads to the equation .
28
The first investment yields 0.055x rands annually, and the second yields 0.030y rands
annually. This leads to the equation . Thus we must solve the
system
.
Now,
and
Therefore, the values invested are R6 400 and R11 600 respectively. Checking, we see
that the total income is . This agrees with the
statement in the problem. U
EXAMPLE 2.9
An 8.0% solution, an 11% solution, and an 18% solution of nitric acid are to be mixed to get
150 mR of a 12% solution. If the volume of acid from the 8.0% solution equals half the
volume of acid from the other two solutions, how much of each is needed?
SOLUTION
Let x = volume of 8.0% solution needed, y = volume of 11% solution needed, and z =
volume of 18% solution needed. The sum of the volumes of the three solutions is 150
mR, which leads to the equation . Since there are 0.080x mR of pure
acid from the first solution, 0.11y mR of the second solution, and 0.18z mR from the third
solution, and 0.12(150) mR in the final solution, we are led to the equation
. Finally, using the last stated condition, we have the
equation . Thus, we must solve the system
Thus
(CHECK!)
and
29
. (CHECK!)
Also,
ACTIVITY 2.14 NN
Solve, using Cramer's rule.
1. 2.
3. 4.
OOOO
EXERCISE 2.4
1. Solve the following systems of equations.
1.1. 1.2.
1.5 1.6
1.7
1.8
30
1.9
1.10
1.11
3. Solve for b if
4. A pharmacist is mixing a 3.0% saline solution and an 8.0% saline solution to get 2.0 R of
a 6.0% solution. How much of each solution is needed?
6. One personal computer can perform x calculations per second and a second personal
computer can perform y calculations per second. If each operates for 2 seconds, 25.0
million calculations are performed. If the first operates for four seconds and the second
for three seconds, 43.2 million calculations are performed. Find x and y.
Using Kirchhoff's laws and electrical principals the equations representing the network can be
written in matrix form as
31
Figure 2.1 An electrical network
(Since this is not a course in electrical engineering, we leave the verification of this matrix
equation to you.)
ACTIVITY 2.15 NN
Consider the network in Figure 2.2.
FIGURE 2.2
1. Solve for I1, I2 and I3.
2. Use electrical knowledge and write down the values of Ia, Ib, Ic, Id, Ie and If.
OOOO
REVIEW EXERCISE
1. Evaluate, if possible.
32
1.1 1.2
1.3 1.4
2.
Determine, if possible,
2.1 A-1 - 2B 2.2 AC 2.3 DC 2.4 C+D
and .
4. Solve for x if
4.1 4.2
5. In each of the following, find the inverse of the matrix or else show that the matrix is
singular.
5.1 5.2
5.3 5.4
5.5 5.6
5.7 5.8
33
6. In each of the following systems, find the unique solution of the system using matrix
inversion
6.1 6.2
7. If possible, find a solution of each of the following linear systems and interpret each
solution geometrically. Use matrix inversion.
7.1 7.2
8.1 8.2
8.3
9. One ampere of electric current is passed through a solution of sulfuric acid, silver nitrate
and cupric sulfate, releasing hydrogen gas, silver and copper. A total mass of 1.750 g is
released. The mass of silver deposited is 3.40 times the mass of copper deposited, and
the mass of copper and 70 times the mass of hydrogen combined equals the mass of
silver deposited less 0.037 g. How much of each is released?
10. A network of guy wires is used to support the 50 kg mass until it can finally be anchored
in position. See Figure 2.3. The forces in the wires are described by the system of
equations
34
Find the forces (in newton).
12. In applying Kirchhoff’s law to the circuit shown in Figure 2.5 the following equations
are found. Determine the indicated currents, in amperes.
Figure 2.5
35
ANSWERS, THEME 102
Activity 2.1
1. x = 2, y = 1 2. a = 2, b = 1 3. p = 2, q = 1
4. x = 13/7, y = 3/7 5. x = 28/13, y = 14/13 6. Discussion
Activity 2.2
1. 2. 3.
4. 5. 6.
7. 8. 9. 4
Activity 2.3
Activity 2.4
1. AB:14 × 14, BA:21 × 21 2. AB and BA doesn't exist
3. AB doesn't exist, BA: 4 × 22 4. AB: 1 × 3, BA doesn't exist
5. AB doesn't exist, BA: 7 × 6
36
Activity 2.5
1.7 1.8 2.
Exercise 2.1
Activity 2.6
1. 16 2. 5 3. -3
4. 20 5. -29 6. 23
7. -26 8. 1
Activity 2.7
1.1 -16; -27 1.2 -17; -24 2. -10; 4
3.1 3.2
Activity 2.8
1. 3 2.1 22 2.2 -120
Activity 2.9
1. 3; 22; -120 2. 3
37
Exercise 2.2
1.1 -48 1.2 -16 1.3 -35
1.4 33 1.5 504 1.6 0
1.7 300 1.8 -12 1.9 6
1.10 -8 2. 7 3. 1; 6
Activity 2.10
1. 2.
Activity 2.11
Exercise 2.3
1.10 2. 3.
Activity 2.12
1.1
1.2
1.3
38
4.1
4.2
4.3
Activity 2.13
1. -3; 6 2. No solution 3. Infinitely many
4. -1; -1; -1
Activity 2.14
1. 5; -2 2. 1; -1 3. 2; -2; -1
4. 1/4; 7/2; -11/4
Exercise 2.4
1. -1/4; -1/12; 2/3 1.2 9; 7 1.3 2; 4; -1
1.4 3/2; 4/5 1.5 -1; 4; 2 1.6 2; ½; -1
1.7 -5; 2 1.8 -5; 4; -1 1.9 47/5; 71/10
1.0 -2; 0; 2 1.11 -5; 1; 4 2. 1/5, -1/7; 1/3
3. -1/5; 1/4; -1 4. 0.8; 1.2 5. V = 4.5i - 3.2
6. 5.7; 6.8
Activity 2.14
1. 0.278 A; -0.281 A; 0.619 A
2. 278 mA; -559 mA; 341 mA; 281 mA; -900 mA; 619 mA
Review exercise
39
4.1 -6 4.2 0; 3/2 5.1
40