myUASARevision for UASA
Mathematics notes, chapter 2

Matrices

Textbook Mathematics Form 5 (DLP), pages 34–71

What this chapter covers

  • Represent information from real situations as matrices and state the type of a matrix (2.1.1)
  • Determine the order of a matrix and identify elements by row and column (2.1.2)
  • Decide whether two matrices are equal and find unknown elements (2.1.3)
  • Add and subtract matrices of the same order and multiply a matrix by a scalar (2.2.1, 2.2.2)
  • Multiply two matrices, and use the identity matrix (2.2.3, 2.2.4)
  • Find the determinant and inverse of a 2 × 2 matrix (2.2.5)
  • Solve simultaneous linear equations and problems using the matrix method (2.2.6, 2.2.7)

2.1Matrices

A matrix is a set of numbers arranged in rows (across) and columns (down) to form a rectangular or square array. It is written with a capital letter, and the numbers sit inside brackets [ ] or ( ).

A table of data can be written as a matrix by keeping only the numbers. Kedai Elektrik Sinar Jaya sold 16, 18 and 11 stand, ceiling and wall fans in the shop and 5, 10 and 4 online:

Matrix A with rows 16, 18, 11 and 5, 10, 4. Row and column labels, the element a23 = 4 circled, and the order 2 by 3.
Rows are counted first, then columns. The circled element is in row 2, column 3.

Types of matrix

TypeMeaningExample
Row matrixonly one row (order 1 × n)1700210020001800
Column matrixonly one column (order m × 1)768272
Square matrixsame number of rows and columns13511024889
Rectangular matrixdifferent number of rows and columns768272808870
A zero matrix O has every element equal to 0, for example O = 000000. For any matrix A of the same order, A + O = A and A − O = A.

Order and elements

A matrix with m rows and n columns has order m × n, read "m by n". Each number in it is an element. The element in the i-th row and j-th column of matrix A is written aij.
Order is always rows × columns. A matrix with 3 rows and 2 columns has order 3 × 2, not 2 × 3. Also, a23 is "row 2, column 3", never the other way round.
Example 3 (textbook p. 39): order and elements
Matrix D = −25340419
(a) D has 4 rows and 2 columns, so its order is 4 × 2.
(b) d11 = −2 (row 1, column 1), d21 = 3 (row 2, column 1), d32 = 4 (row 3, column 2).
For N = 3−17025, state the order of N and the element n23.
Show answerHide answer
N has 2 rows and 3 columns: order 2 × 3.
n23 is in row 2, column 3: n23 = 5.

Equal matrices

Matrices M and N are equal (M = N) if and only if they have the same order and every corresponding element is equal.
Example 5 (textbook p. 41)
Given x705 − 3z = 5y + 102z, find x, y and z.
Match the elements: x = 5; 7 = y + 1, so y = 6; 5 − 3z = 2z, so 5 = 5z and z = 1.
A row matrix [3 9] and a column matrix with the same two numbers are not equal: their orders (1 × 2 and 2 × 1) are different.
Find x and y if x47y − 2 = 9475.
Show answerHide answer
x = 9; y − 2 = 5, so y = 7.

2.2Basic operations on matrices

Adding and subtracting matrices

Matrices can be added or subtracted only if they have the same order. Add or subtract each pair of corresponding elements. The answer has the same order.
Example 7 (textbook p. 43)
March sales P = 1618115104, April sales Q = 201597125.
P + Q = 36332012229 (total sales, March and April)
Q − P = 4−3−2221 (change from March to April)
Calculate 3−251 + 46−50 and 3−251 − 46−50.
Show answerHide answer
Sum: 7401
Difference: −1−8101
Addition and subtraction obey some laws of arithmetic. A + B = B + A, (A + B) + C = A + (B + C) and h(A + B) = hA + hB. Subtraction does not: A − B ≠ B − A in general.

Multiplying a matrix by a number

Scalar multiplication: nA means A added to itself n times. Multiply every element by the number n, which is called a scalar.
Example 12 (textbook p. 48): combined operations
22−140 − 313−25
= 4−280 − 39−615  (scalar multiplication first)
= 1−1114−15
When you multiply a matrix by a negative scalar, every element changes sign. Do not forget the elements that are 0 or negative already.
Calculate 32−140 − 213−25.
Show answerHide answer
6−3120 − 26−410 = 4−916−10

Multiplying two matrices

AB can be calculated only if the number of columns in A = number of rows in B. If A is m × n and B is n × p, then AB has order m × p.
A is m by n, B is n by p, the product AB is m by p; the two inner n values must match.
The inner numbers must match; the outer numbers give the order of the product.

To find an element of AB, multiply the elements of a row of A by the elements of a column of B, then add the products. Row i of A and column j of B give the element in row i, column j of AB.

Multiplying a matrix by a column matrix (textbook p. 50): commission
P = 1618115104, K = 253020 (commission in RM per fan).
P is 2 × 3 and K is 3 × 1, so PK can be done and has order 2 × 1.
PK = 16(25) + 18(30) + 11(20)5(25) + 10(30) + 4(20) = 1160505
The shop earned RM1 160 in commission and online RM505.
Example 16 (textbook p. 51): AB and BA
A = 142−3, B = 50−12
AB = 1(5) + 4(−1)1(0) + 4(2)2(5) + (−3)(−1)2(0) + (−3)(2) = 1813−6
BA = 5203−10
AB and BA are usually not equal, and one can exist when the other does not. Always write the matrices in the order the question gives.
Is 123102 possible? State the order of the answer and find it. Can the matrices be multiplied the other way round?
Show answerHide answer
1 × 3 times 3 × 1 is possible; the order is 1 × 1. [1(1) + 2(0) + 3(2)] = [7].
Reversed: 3 × 1 times 1 × 3 is also possible, but the order is 3 × 3.

Identity matrix

The identity matrix I is a square matrix with 1 along the main diagonal (top left to bottom right) and 0 everywhere else, such as 1001 and 100010001. For any matrix A that can be multiplied with I, AI = IA = A.

I plays the part of the number 1 in matrix multiplication.

Inverse matrix of a 2 × 2 matrix

The inverse of A is the matrix A−1 such that AA−1 = A−1A = I. Only square matrices can have an inverse, and some do not have one.

For A = abcd, the determinant is |A| = ad − bc. The inverse exists only when ad − bc ≠ 0, and then

A−1 = 1ad − bcd−b−ca

In words: swap the two elements on the main diagonal, change the sign of the other two, and multiply by 1 over the determinant.

Example 23 (textbook p. 60)
(a) 1248: ad − bc = 1(8) − 2(4) = 0, so there is no inverse.
(b) 3524: ad − bc = 3(4) − 5(2) = 2, so the inverse is 124−5−23 = 2−52−132.
Do not forget the factor 1 over (ad − bc). Swapping the elements and changing signs alone gives a matrix that is not the inverse unless the determinant is 1.
Find the inverse of 4322.
Show answerHide answer
ad − bc = 4(2) − 3(2) = 2.
Inverse = 122−3−24 = 1−32−12

Solving simultaneous linear equations

Write the equations ax + by = p and cx + dy = q as AX = B, that is abcdxy = pq. Multiply both sides on the left by A−1:

StepWorking
1Write in the form AX = B
2Find A−1 (check that |A| ≠ 0)
3X = A−1B, so multiply A−1 by B
4Read off x and y, and check in the original equations
Example 28 (textbook p. 63)
Solve x − 2y = 1 and 3x − 4y = 4.
1−23−4xy = 14
|A| = 1(−4) − (−2)(3) = 2, so xy = 12−42−3114 = 1241 = 212
x = 2 and y = 12. Check: 2 − 2(12) = 1 and 3(2) − 4(12) = 4.
Keep A−1 on the left: X = A−1B. The product B A−1 is usually impossible or different.
Solve 2x + y = 7 and x − y = 2 by the matrix method.
Show answerHide answer
211−1xy = 72. |A| = 2(−1) − 1(1) = −3.
X = -13−1−1−1272 = -13−9−3 = 31.
x = 3, y = 1.

Problem solving

Name the unknowns, form two linear equations, write them as AX = B, then use X = A−1B and state the answer in words.

Example 29 style: tickets
2 child tickets and 1 adult ticket cost RM19. 3 child tickets and 2 adult tickets cost RM33. Let child = x, adult = y.
2x + y = 19, 3x + 2y = 33: 2132xy = 1933
|A| = 2(2) − 1(3) = 1, so X = 2−1−321933 = 59.
A child ticket costs RM5 and an adult ticket RM9.
A pen and a ruler cost RM5 together, and 2 pens and 3 rulers cost RM11. Form the equations and write them as a matrix equation (do not solve).
Show answerHide answer
p + r = 5, 2p + 3r = 11: 1123pr = 511

Notes follow Mathematics Form 5 (KSSM, DLP), Chapter 2, pp. 34-71; examples use new numbers and the figures are redrawn.