Module Matrices Notes
Module Matrices Notes
MATRICES
WHAT IS A MATRIX?
Matrices are datasets that have been enclosed within square brackets
Order of a Matrix
Order of a matrix = number of rows x number of columns.
REMEMBER: row, row, ROW (↔) your boat gently DOWN ( ↕ ) the stream.
The numbers, or entries, in the matrix are called elements. The number of elements in a matrix is
determined by its order.
EXAMPLE:
A= or A=
The number of elements in matrix A is 4, as there are 4 total values (1, 2, 3 and 4)
If a question wants to find the matrix elements using a rule, substitute the appropriate rows and columns to
find the element value. Eg. Aij = i + j = a11 = row 1 + column 1 = 2
Row Matrices
Matrices that have been formed from only one row of data.
EXAMPLE:
K=
Matrix K is a row matrix as it has ONE row to x columns (1 x 4)
Column Matrices
Matrices that have been formed from only one column of data.
EXAMPLE:
S=
Transposing Matrices
Transposing a matrix involves switching the rows and columns of the elements within the matrix, indicated
by
[Matrix]T AT.
A transposed matrix features the same elements as the original but with the rots and columns swapped
If matrix A has an order m x n, then AT has an order of n x m.
EXAMPLE:
=
Thus, the transposes order of 3x2 is 2x3.
Square Matrices
A matrix with an equal number of rows and columns is called a square matrix.
E.g. 2x2, 3x3, 4x4, 5x5...
EXAMPLE:
S=
Diagonal Matrices
A square matrix has two diagonals:
EXAMPLE:
In practice, the downwards diagonal (red) is more important than the other (blue) then it is called the
leading diagonal.
A square matrix is called a diagonal matrix if all the elements off the leading diagonal are zero. The leading
diagonal may or may not be zero.
EXAMPLE:
Identity Matrices
Diagonal matrices in which all of the elements in the diagonal are of special importance. They are called
identity or unit matrices and have their own symbol (I).
Symmetric Matrices
A symmetric matrix is a square matrix that is unchanged by transposition (switching rows and columns).
In a symmetric matrix, the elements above the leading diagonal are a mirror image of the elements below
the diagonal.
EXAMPLE:
= Symmetric
Triangle Matrices
Triangular matrices come in two types:
1. An upper triangular matrix is a square matrix in which all elements below the leading diagonal are zeros.
2. A lower triangular matrix is a square matrix in which all elements above the leading diagonal are zeros.
EXAMPLE:
EXAMPLE:
The table below shows the three types of membership of a local gym and the number of males and females
enrolled in each. Construct a matrix to display the numerical information in the table.
W A F
M
F
EXAMPLE:
Convert the 16-digit credit card number: 4454 8178 1029 3161 into a 2x8 matrix, listing the digits in pairs,
one under the other. Ignore the spaces.
EXAMPLE:
Represent the network diagram shown below as a 4x4 matrix, A, where the:
matrix element = 1 if the two points are joined by a line
1 2 3 4
1
2
3
4 EXAMPLE:
The diagram below shows the roads connecting four towns: town 1, town 2,
town 3, and town 4.
This diagram has been represented by a 4×4 matrix, A. The elements show the number of roads between
each pair of towns.
(a.) In the matrix, A, a24 = 1. What does this tell us?
(b.) In the matrix, A, a34 = 3. What does this tell us?
(c.) In the matrix, A, a41 = 0. What does this tell us?
(d.) What is the sum of the elements in row 3 of matrix A and what does this tell us?
(e.) What is the sum of all the elements of matrix A and what does this tell us?
EXAMPLE:
is equal to because the corresponding elements are equal
EXAMPLE:
A= B=
(a.) Find A + B
(b.) Find A – B
(a.) A + B = +
(b.) A – B = –
Scalor Multiplication
Multiplying a matrix by a number has the effect of multiplying each element in the matrix by that number.
Multiplying a matrix by a number is called scalar multiplication, because it has the effect of scaling the matrix
by that number.
For example, multiplying a matrix by 2 doubles each element in the matrix.
EXAMPLE:
A= C=
(a.) Find 3A
(b.) Find 0.5C
(a.) 3A = 3 x =
EXAMPLE:
G= H=
Show that 3G – 2H = O
3G – 2H = 3 x - 2 x = –
= =
Therefore, 3G – 2H = O
By Hand Steps:
1. Determine if the matrix product is defined
2. Multiply each element in the row matrix by the corresponding element in the column matrix
3. Add the results
E.g.
=
EXAMPLE:
Evaluate the matrix AB where A = and B =
X 1x3|3x1 = 1x1
=
= [16]
EXAMPLE:
Evaluate the matrix AB where A = and B =
X 2x2|2x1 = 2x1
=
=
E.g:
EXAMPLE:
Use matrix multiplication of generate a matrix that displays row sums of the matrix
Sums the rows by post-multiplying a 3x1 summing matrix:
=
EXAMPLE:
Use matrix multiplication of generate a matrix that displays row sums of the matrix
Sums the columns by pre-multiplying a 1x2 summing matrix
Simultaneous Equations
EXAMPLE:
Show that the matrix equation: generates the following pair of simultaneous linear equations:
4x + 2y = 5
3x + 2y = 2
, Therefore: ∴ 4x+2y=5
3x + 2y = 2
THE POWER OF A MATRIX
Just as we define
22 as 2×2,
23 as 2×2×2,
24 as 2×2×2×2 and so on,
A2 as A×A,
A3 as A×A×A,
A4 as A×A×A×A and so on.
EXAMPLE:
If A = , B=, C=,
Determine:
(a.) 2A + B2 - 2C
(b.) (2A - B)2 - C2
(c.) AB2 - 3C2
Using the CAS feature, input & store the matrices undera, b & c respectively (refer to page 55 for CAS
instructions).
(a.) Type in 2 x A + B2 – 2 x C =
(b.) Type in (2 x A - B)2 - C2 =
(c.) Type in A x B2 – 3 x C2 =
E.g
Permutation Matrix
A permutation matrix is a square binary matrix in which there is only one ‘1’ in each row and column.
An identity matrix is a special permutation matrix. A permutation matrix can be used to rearrange the
elements in another matrix.
E.g
EXAMPLE:
X is a column matrix X =
(ai.) PX = x =
(aii.) P2X = 2 x =
(b.) P2 is the identity matrix I =
Communication Matrices
A communication matrix (C) is a square binary matrix in which the 1s are used to identify the direct (one-
step) links in the communication system.
The number of two-step links in a communication system can be identified by squaring its communication
matrix. The total number of one and two-step links in a communication system can be found by evaluating
the matrix sum:
T = C + C2
These statements can be readily generalised to include the determination of three (or more) step links by
evaluating the matrices C3, C4, etc. However, unless the communication networks are extremely large, most
of the multi-step links identified will be redundant.
NOTE: In all cases, the diagonal elements of a communication matrix (or its power) represent redundant
communication links.
EXAMPLE:
Eva, Wong, Yumi and Kim are students who are staying in a backpacker’s hostel. Because they speak different
languages they can have problems communicating.The situation they have to deal with is that:
Eva speaks English only
Yumi speaks Japanese only
Kim speaks Korean only
Wong speaks English, Japanese and Korean.
Conveniently, this information can be summarised in a network diagram, as shown below. In this diagram,
the arrow linking Eva and Wong indicates that they can communicate directly because they both speak
English. The task is to construct a communication matrix.
Dominance
One-Step Dominances
The first dominance matrix, D, records the number of one- step (direct) dominances between players.
Two-Step Dominances
A two-step dominance occurs when a player beats another player who had previously beaten someone else.
Two-step dominances can be determined using the same technique used to obtain two-step links in a
communication network by squaring the one-step dominance matrix for matrix D 2.
We can combine the information contained in both D and D 2 by calculating a new matrix T = D + D2
NOTE: When drawing matrix, the losers are at the top (horizontal) and the winners are on the side (vertical),
thus fill out the matrix row by row (move across)
EXAMPLE:
Four people, A, B, C and D, have been asked to form a committee to decide on the location of a new toxic
waste dump. From previous experience, it is known that:
A influences the decisions of B and D
B influences the decisions of C
C influences the decisions of no one
D influences the decisions of C and B
(a.) Use the graph to construct a dominance matrix that takes into account both one-step and two-step
dominances
(b.) From this matrix, determine who is the most influential person on the committee
(a.)
(b.) Person A is the most influential person with a total dominance score of 5.
EXAMPLE:
Show that the matrices A = and B = are inverses
AB = X
=
=
Therefore, AB = 1
BA = X
=
=
Therefore, BA = 1
While this example demonstrates that the matrices A and B both have inverses, many square matrices do
NOT have inverses.
Determinant of Matrices
If A = , then the determinant of matrix A is given by:
Det(A) = = (a x d – b x c)
EXAMPLE:
Find the determinant of the matrices:
(a.) A =
(b.) B =
(c.) C =
(a.) A = Det(A) = = (a x d – b x c)
Therefore, det(A) = = 2 x 5 – 3 x 3 = 1
(b.) B = Det(A) = = (a x d – b x c)
Therefore, det(B) = = 2 x 3 – 2 x 3 = 0
(c.) C = Det(A) = = (a x d – b x c)
Therefore, det(C) = = 2 x 3 – 2 x 4 = -2
The most important thing about this rule is that is shows immediately why some matrices have no inverse.
These matrices have determinants of zero.
EXAMPLE:
Find the inverse of the following matrices:
(a.) A =
(b.) B =
(a.) A = det(A) = = 2 x 4 – 3 x 2 = 2
A-1 = =
A-1 =
(b.) B = det(B) = = 2 x 3 – 2 x 3 = 0
B does not have an inverse
EXAMPLE:
For the matrix A = , what is the value of for which A = A -1
1. Find Inverse of A
A-1 = =
2. Choose an Element in the same location of A and A -1 (2 and -4) and solve
Solve()
{x = -2}
EXAMPLE:
A=
For a particular vale of u. A-1 = . Find u.
Step 1:
A-1 = = .
Step 2:
det(A) = =
Step 3:
= Solve( = , det(A), det(A) =
Step 4:
Solve( = , u)
{u = 6}
Using matrices, the process of solving a pair of simultaneous linear equations can be reduced to finding the
inverse of a matrix and performing a matrix multiplication.
Provided that det(A) 0, the set of linear equations defined by the matrix equation AX = C has the unique
solution:X = A-1C
Note: The order of multiplication is important here:X = A-1C, not CA-1.You need to know when it does not
work and why. It has to do with the fact that not all square matrices have inverses. First, we need to
recognise that not all pairs of simultaneous linear equations have solutions.This can happen for two reasons:
1. The equations are inconsistent: their graphs are parallel and thus do not cross.
2. The equations are dependent: the graphs coincide and thus do not cross at a single point
EXAMPLE:
Solve using matrix methods:
3x + 4y = 6
2x + 3y = 4
Let A = , X = , C =
Provided that det(A) 0, if AX = C, then X = A-1C:
=
Therefore, X = , or x = 2 and y = 0
EXAMPLE:
Solve using matrix methods:
3x + 4.5y = 9
2x + 3y = 4
Let A = , X = , C =
Provided that det(A) 0, if AX = C, then X = A-1C:
=
Therefore, there is no unique solution as det(A) = 0
EXAMPLE:
Solve using matrix methods:
3x + 4y − 2z = −5
2x + 3y = −1
x + 2y + 3z = 3
Let A = , X = , C =
Provided that det(A) 0, if AX = C, then X = A-1C:
= =
Therefore, X = , or x = -11, y = 7 and z = 0
EXAMPLE: Practical Applications
A manufacturer makes two sorts of orange-flavoured chocolates: House Brand and Orange Delights. The
number of kilograms of House Brand (x) and the number of kilograms of Orange Delights (y) that can be
made from 80 kg of chocolate and 120 kg of orange filling can be found by solving the following pair of
equations:
0.3x + 0.5y = 80
0.7x + 0.5y = 120
Solve for x and y using matrix methods.
Let A = , X = , C =
Provided that det(A) 0, if AX = C, then X = A-1C:
=
Therefore, X = , or x = 100 and y = 100
Inconsistent Equations
As a general rule, if a pair of liner equations is inconsistent, det(A) = 0.Inconsistent equations have NO
SOLUTION.
EXAMPLE:
The pair of simultaneous linear equations
x + 2y = 4
2x + 4Y = 6
has NO SOLUTION. We can see why by plotting their graphs.
When plotted, the twoequations are PARALLEL LINES with no point of
intersection. Sets of equations that have this property are inconsistent. If
using the matrix method to solve, the determinant of the coefficient matrix is
det(A)=1 x 4 - 2 x 2 = 0
Dependent Equations
As a general rule, if a pair of linear equations is dependent, det(A) = 0.Dependent equations have NO
UNIQUE SOLUTION.
EXAMPLE:
The pair of simultaneous linear equations
x + 2y = 4
2x + 4y = 8
Has NO SOLUTION. We can see why by plotting their graphs.
When plotted, the graphs of the two equations COINCIDE, with no
single point of intersection. There is no unique solution, there are an
infinite number of possible solutions; i.e. all the pairs that lie on the
line. When this happens, the equations are dependent. If using the
matrix method to solve, the determinant of the coefficient matrix is
det(A)=1 x 4 – 2 x 2 = 0
EXAMPLE:
The diagram gives the weekly return rates of rental cars at three locations: Albury, Wodonga and Benalla.
Construct a transition matrix that describes the week-by-week return rates at each of the three locations.
Convert the percentages to proportions.
EXAMPLE:
A factory has a large number of machines. Machines can be in one of two states: opera ng or broken. Broken
machines are repaired and come back into opera on, and vice versa. On a given day:
85% of machines that are operational stay operating.
15% of machines that are operating break down.
5% of machines that are broken are repaired and start operating again.
95% of machines that are broken stay broken.
Construct a transition matrix to describe this situation. Use the columns to de ne the situation at the ‘Start’
of the day and the rows to describe the situation at the ‘End’ of the day.
EXAMPLE:
The following transition matrix, T, and its transition diagram can be used to describe the weekly pattern of
rental car returns in three locations: Albury, Wodonga and Benalla.
Use the transition matrix T and its transition diagram to answer the following questions.
(a.) What percentage of cars rented in Wodonga each week are predicted to be returned to:
i. Albury? ii. Benalla? iii. Wodonga?
(b.) Two hundred cars were rented in Albury this week. How many of these cars do we expect to be returned
to:
i. Albury? ii. Benalla? iii. Wodonga?
(c.) What percentage of cars rented in Benalla each week are not expected to be returned to Benalla?
(d.) One hundred and sixty cars were rented in Albury this week. How many of these cars are expected to be
returned to either Benalla or Wodonga?
EXAMPLE:
If the car rental firm now plans to buy 90 new cars. 50 will be based in Bendigo and 40 in Colac, how many
cars
will be available for rent at both towns after 1 week, week 2 and week 3?
S0 = S1 = T x S0 =
S1 =
S2 = T x S1 = =
S3 = T x S2 = =
EXAMPLE:
The factory has a large number of machines. The machines can be in one of two states: operating (O) or
broken (B). Broken machines are repaired and come back into operation and vice versa. At the start, 80
machines are operating and 20 are broken. Use the recursion relation: S0 = initial value, Sn+1 = TSn to
determine the number of operational and broken machines after 1 day and after 3 days. where:
S0 = and T =
S1 = TS0 = =
After 1 day, 69 machines are operational and 31 are broken
S2 = TS1 = =
S3 = TS2 = =
After 3 days, 53 machines are operating and 47 are broken
Rules for Determining the State Matrix of a System after n steps
If the recurrence rule for determining state matrices is S 0 = initial state matrix, Sn+1 = TSn,the state matrix
after n steps (or transitions) is given by:
Sn = TnS0.
If we follow through the recurrence rule process step-by step, we have:
S1 = TS0
S2 = TS1 = T(TS0) = T2S0
S3 = TS2 = T(TS1) = T2S1 = T2(TS0) = T3S0
Continuing the process S4 = T4S0 S5 = T5S0
Or more generally, Sn = TnS0.
EXAMPLE:
The factory has a large number of machines. The machines can be in one of two states: operating (O) or
broken (B).
Broken machines are repaired and come back into operation and vice versa. Initially, 80 machines are
operating and 20 are broken, so:
S0 = and T =
Determine the number of operational and broken machines after 10 days.
EXAMPLE:
For the car rental problem:
S0 = and T =
Estimate the steady-state solution by calculating Sn for n = 10, 15, 17 and 18.
EXAMPLE:
A rental starts with 90 cars, 50 located at Bendigo and 40 located at Colac. Cars are usually rented and
returned in the same town. However, a small percentage of cars rented in Bendigo are returned in Colac and
vice versa. To increase the number of cars, two extra cars are added to the rental fleet at each location each
week. The recurrence relation that can be used to model this situation is
S0 = Sn+1 = TSn + B where T = and B =
Determine the number of cars at Bendigo and Colac after:
(a.) 1 week
(b.) 2 weeks
(a.) S1 = TS0 + B =
Thus, we predict that there will be 46 cars in Bendigo and 48 cars in Colac.
(b.) S2 = TS1 + B =
Thus, we predict that there will be 44 cars in Bendigo and 54 cars in Colac.
BINARY MATRICES
SUMMING MATRICES
Then: =
AX = C so X = A-1C Provided 0, that is, provided
det(A) 0
POWER MATRICES
Just as we define DETERMINANT
22 as 2×2, If A = , then the determinant of matrix A is given
23 as 2×2×2, by:
24 as 2×2×2×2 and so on, Det(A) = = (a x d – b x c)
TRANSITION MATRICES
TRANSITION MATRICES RULE FOR STATE MATRIX
A transition matrix (T) describes the way in which Sn = TnS0.
transitions are made between two states.
REMEMBER: The columns(↕)will always equate STEADY STATE MATRIX
to(1.0) 100%. Percentage X% should be Sn = TnS0 to find the nth state
converted to Proportions 0.X
TRANSITION MATRIX MODELLING
RECURSION AND STATE MATRICES S0 = initial state matrix, Sn+1 = TSn + B
S0 = initial value, Sn+1 = TSn