Matrices AI HL
Matrices store a table of numbers so that one calculation handles many quantities at once. The page starts with the rules for adding and multiplying matrices, then uses the determinant and the inverse to undo a matrix and to solve a system of equations, and finishes with eigenvalues and eigenvectors of matrices. In an exam the set-up is yours and the arithmetic is the calculator's: enter the matrices, choose the operation, and write down what you entered and what you read.
Formulas at a glance
The determinant and inverse of a matrix and the formula for a power of a matrix are in the formula booklet. The rule for when a product exists, the solution of a system, and the characteristic equation are not, so learn them.
Determinant of
In the bookletInverse of a 2 by 2 matrix
In the bookletProduct of two matrices
An matrix times an matrix is an matrix
Not in the bookletSolving a system of equations
Not in the bookletCharacteristic equation, for the eigenvalues
Not in the bookletEigenvector for a given eigenvalue
Not in the bookletPower of a matrix, by diagonalisation
In the bookletWhich method to use
Decide what the question gives you and what it wants, then check the order of the matrices before entering anything on the calculator.
| The question has | Use | Notes |
|---|---|---|
| Two matrices to multiply, such as a table of quantities and a column of prices | Check that the columns of the first equal the rows of the second, then multiply on the calculator | The order of the product is rows of the first by columns of the second, and is usually not |
| A sum, a difference or a scalar multiple of matrices | Add or subtract entry by entry, or multiply every entry by the scalar | Addition and subtraction need matrices of the same order |
| The determinant, a test for an inverse, or the area scale factor of a transformation | for a matrix, or the determinant command for larger matrices | A determinant of means there is no inverse. The size of the determinant is the area scale factor |
| The inverse of a matrix | The formula by hand, or the inverse key on the calculator | Divide by the determinant. Check by multiplying: the product is |
| Two or three linear equations, or a matrix times an unknown vector equal to a known vector | Write , then or the equation solver | The inverse goes on the left of . State what each unknown stands for |
| The eigenvalues of a matrix | Solve , with the polynomial solver or the eigenvalue command | The equation is . A diagonal matrix has its diagonal entries as eigenvalues |
| An eigenvector for a given eigenvalue | Solve | The two rows are multiples of each other, so use one row. Any non-zero multiple is also an eigenvector |
| A high power of a matrix with distinct real eigenvalues | , with the eigenvectors as the columns of | Raise each diagonal entry of to the power |
Section 1 of 4 AHL1.14
Matrix operations
Matrices of the same order can be added or subtracted entry by entry, and any matrix can be multiplied by a scalar. Two matrices can be multiplied only when the number of columns in the first equals the number of rows in the second, and the order matters because and usually differ. It also covers order, elements and the identity matrix.
Matrix multiplication
Matrix multiplication
Only defined when the number of columns in the first matrix equals the number of rows in the second. Associative and distributive, but in general - the order you multiply in matters.
Not in the formula booklet - definitionKey terms
What is the order of a matrix?
The order of a matrix is written , where is the number of rows and is the number of columns. Rows are always counted first.
e.g. has order .
What is an element of a matrix?
An element is a single entry in the matrix. The element in row and column of is written .
e.g. In , the element in row , column is .
What is the identity matrix?
The identity matrix is a square matrix with on the leading diagonal and elsewhere. Multiplying by it leaves a matrix unchanged, so .
e.g. .
How do you multiply a matrix by a scalar?
Multiply every element of the matrix by the scalar. The order of the matrix does not change.
e.g. .
Worked example, step by step
The question Calculator needed [5 marks]
Three cafes sell coffee and tea. Matrix shows the number of each drink sold in one day, with one row for each cafe (A, B, C) and one column for each drink (coffee, tea): The prices in pounds of the two drinks are given by
(a) Write down the order of .
(b) Find the matrix .
(c) Both prices rise by 10%. Find each cafe's daily takings after the rise, assuming the sales do not change.
Worked solution: worked example
Answer: (a) (b) (c) £169.40, £167.75 and £135.85 for cafes A, B and C
Step 1 - Write down the order.
has 3 rows and 2 columns, so its order is . A1 -
Why? The order is always written rows first, then columns.
Step 2 - Check that the product exists.
has order . The number of columns of is 2 and the number of rows of is 2, so exists and has order : one value for each cafe.
Why? Two matrices can only be multiplied when the columns of the first match the rows of the second. The product does not exist, because has 1 column and has 3 rows, which shows that the order of multiplication matters.
Step 3 - Multiply on the calculator.
Enter as a matrix and as a matrix in matrix mode, then calculate . Each entry is a row of times the column : So M1 - Multiply by (a row of times the column ) A1 -
Why? Each entry is the daily takings in pounds of one cafe, because the number of each drink is multiplied by its own price and the results are added.
Step 4 - Apply the price rise.
A rise of 10% multiplies every price by 1.1, so the new prices are and the new takings are Cafe A takes £169.40, cafe B takes £167.75 and cafe C takes £135.85. M1 - Multiply their by A1 - , and
Why? Multiplying a matrix by a scalar multiplies every entry. The result agrees with multiplying each takings value by 1.1, which is a quick check.
A1
M1 Multiply by (a row of times the column )
A1
M1 Multiply their by
A1 , and
Now you try: enter your answers to be marked
These are real practice questions. Type your answer in each box and press Mark it. The worked solution and mark scheme appear straight away, and your first attempt is the one that counts. Use the keyboard for powers, roots and trig, and the working box for your notes.
Worked solution: practice question 1
Worked solution: practice question 2
Worked solution: practice question 3
Your score so far: 0 out of 7 marks
Calculator steps: Matrix operations and solving systems
Common mistakes
- Assuming matrix multiplication is commutative. and are generally different matrices, and one might not even be defined - never swap the order without checking the dimensions line up.
- Multiplying matrices whose dimensions don't allow it. only exists when the number of columns in equals the number of rows in - check this before starting the row-by-column arithmetic, not after.
- Forgetting a zero determinant means no inverse. If , the matrix is singular and doesn't exist - though the IB guarantees is invertible whenever a question asks you to find .
Section 2 of 4 AHL1.14
Determinants and inverses
The determinant of is , and the matrix has an inverse exactly when this value is not zero. To invert it, swap and , change the signs of and , then divide every entry by the determinant. It also covers singular matrices and checking an inverse.
The determinant and inverse formulas
Both formulas below are given in the formula booklet.
Determinant of a matrix
for
A determinant of means the matrix is singular - it has no inverse, and any system it represents has no unique solution. For the matrix of a transformation, is the area scale factor: a region of area is mapped to a region of area .
Inverse of a matrix
Swap the leading-diagonal entries, negate the other two, then divide everything by the determinant. Only defined when .
Key terms
What does the determinant tell you?
A non-zero determinant means the matrix has an inverse, and a zero determinant means it does not. The determinant can be positive, negative or zero.
e.g. For , , which is not zero, so the inverse exists.
What is a singular matrix?
A singular matrix is a square matrix with determinant zero. It has no inverse, so it cannot be used to solve a system by multiplying by .
e.g. is singular because .
What is the identity matrix?
The identity matrix has on the leading diagonal and elsewhere, and . A matrix and its inverse multiply to give .
e.g. For , and .
How do you find an inverse when the determinant is not 1?
Swap the leading diagonal, negate the other two entries, then multiply by . Every entry of the swapped matrix is divided by the determinant.
e.g. For , , so the inverse is .
Worked example, step by step
The question Calculator needed [6 marks]
A map-drawing program moves every point of a plan by multiplying its coordinates by the matrix where is a constant. The program can only undo the change if has an inverse.
(a) Find in terms of .
(b) Find the value of for which the change cannot be undone.
(c) For , find .
Worked solution: worked example
Answer: (a) (b) (c)
Step 1 - Find the determinant.
For the determinant is . Here , so M1 - Use A1 -
Why? Multiply the leading diagonal and subtract the product of the other diagonal. The answer stays in terms of .
Step 2 - Use the condition for an inverse.
A matrix has an inverse exactly when its determinant is not zero. The change cannot be undone when M1 - Set their determinant equal to A1 -
Why? When the matrix is singular, and the formula for the inverse would divide by zero.
Step 3 - Substitute and find the inverse.
Now and , which is not zero. Swap the entries and , change the signs of and , and divide by : M1 - Use with A1 -
Why? The formula is . The factor multiplies every entry.
Step 4 - Check on the calculator.
Enter and in matrix mode and calculate . The calculator returns , the identity matrix.
Why? A matrix times its inverse is the identity, so this confirms the inverse. The calculator's own inverse key gives the same entries as decimals.
M1 Use
A1
M1 Set their determinant equal to
A1
M1 Use with
A1
Now you try: enter your answers to be marked
Worked solution: practice question 1
Worked solution: practice question 2
Worked solution: practice question 3
Your score so far: 0 out of 11 marks
Calculator steps: Matrix operations and solving systems
Common mistakes
- Mixing up with . The determinant multiplies along the leading diagonal first (), then subtracts the product of the other diagonal () - keep the entries in the right pairs.
- Forgetting to swap the leading diagonal in the inverse. and trade places, while and simply get a minus sign - it's easy to negate the wrong pair under time pressure.
- Trying to invert a matrix with determinant zero. Check before dividing - a zero determinant means the inverse doesn't exist, not that you made an arithmetic slip.
Section 3 of 4 AHL1.14
Solving systems with matrices
A system of linear equations can be written as , where holds the coefficients, the unknowns and the constants. When is invertible, multiply both sides on the left by to get . It also covers setting up the matrices correctly and recognising when no inverse exists.
Solving
Singular matrices
A singular matrix has no inverse, and the corresponding system of equations has no unique solution - it is either inconsistent or has infinitely many solutions.
Key terms
What is the coefficient matrix?
The coefficient matrix contains the coefficients of the unknowns, with one row for each equation and one column for each unknown. The unknowns are kept in the same order in every row.
e.g. The system , has .
What is an inverse matrix?
The inverse is the matrix that satisfies . It exists only when the determinant of is not zero.
e.g. The inverse of is , because their product is .
Why does the order of multiplication matter?
Matrix multiplication is not commutative, so must go on the left of . Multiplying on the right is usually not even possible.
e.g. For a matrix and a column of order , is defined but is not.
What is the identity matrix?
The identity matrix has on the leading diagonal and elsewhere, and . It is why multiplying both sides by isolates .
e.g. , where for a system .
Worked example, step by step
The question Calculator needed [5 marks]
A cafe sells bagels, muffins and smoothies. On Monday, 4 bagels, 2 muffins and 1 smoothie cost £21.00 in total. On Tuesday, 2 bagels, 3 muffins and 2 smoothies cost £21.50. On Wednesday, 1 bagel, 1 muffin and 3 smoothies cost £17.50.
Use a matrix method to find the price of each item.
Worked solution: worked example
Answer: Bagel £3.00, muffin £2.50, smoothie £4.00
Step 1 - Define the unknowns and write the equations.
Let be the prices in pounds of a bagel, a muffin and a smoothie. Then M1 - Form the three equations
Why? There is one equation for each day, with the number of each item as the coefficients. Naming the unknowns first keeps the final answer in context.
Step 2 - Write the system as .
The calculator gives , which is not zero, so has an inverse and . M1 - Write and use
Why? Each row of holds the coefficients of one equation and holds the totals. Multiply by the inverse on the left of , because matrix multiplication is not commutative.
Step 3 - Calculate on the calculator.
Enter as a matrix and as a matrix, then calculate . The calculator returns A1 - Bagel A1 - Muffin A1 - Smoothie
Why? The equation solver in the calculator gives the same values, and either route is accepted. State the result in words: a bagel costs £3.00, a muffin £2.50 and a smoothie £4.00.
Step 4 - Check in an equation.
Wednesday: , which agrees with the total.
Why? Substituting the three prices back into one of the original equations is a quick check that the matrices were entered correctly. Repeat it with the other two equations for a full check.
M1 Form the three equations
M1 Write and use
A1 Bagel
A1 Muffin
A1 Smoothie
Now you try: enter your answers to be marked
Worked solution: practice question 1
Find using matrix methods.
Worked solution: practice question 2
Set up and solve, using matrices, a system of equations to find the mass, in kg, of each fertiliser used.
Worked solution: practice question 3
Your score so far: 0 out of 15 marks
Calculator steps: Matrix operations and solving systems, Solve a system of equations
Common mistakes
- Multiplying in the wrong order. Matrix multiplication is non-commutative - it must be , not , which usually isn't even a valid multiplication for a column vector.
- Missing a sign or entry when reading off the system into and . Write each equation in the same variable order first () before copying coefficients across, so nothing gets transposed by accident.
- Not checking before trusting a unique solution. If the determinant comes out as zero, the system does not have a single answer - it's either inconsistent or has infinitely many solutions, and needs a different argument.
Section 4 of 4 AHL1.15
Eigenvalues and eigenvectors
An eigenvector of a matrix is a non-zero vector that satisfies , where the scalar is the eigenvalue. For a matrix, solve the characteristic equation to find , then solve for for each eigenvalue. It also covers diagonalisation and using it to find powers of a matrix.
Finding eigenvalues and eigenvectors
The formula below is not in the formula booklet - it is a definition you apply directly.
Eigenvector for a given
Substitute one eigenvalue at a time and solve the resulting equations for . Any non-zero scalar multiple of the answer is an equally valid eigenvector.
Key terms
What is the characteristic polynomial?
It is the expression . For a matrix it is a quadratic in , and its roots are the eigenvalues.
e.g. For , , so or .
What is an eigenvalue?
An eigenvalue is the scale factor by which a matrix stretches or shrinks one of its eigenvectors. A matrix has at most two eigenvalues, and a diagonal matrix has its diagonal entries as eigenvalues.
e.g. With and , , so .
What is an eigenvector?
An eigenvector is a non-zero vector whose direction is unchanged when it is multiplied by the matrix. Each eigenvalue has a whole family of eigenvectors, all scalar multiples of one another.
e.g. For , gives , so , and .
What does it mean to diagonalise a matrix?
Diagonalising writes the matrix as , where is a diagonal matrix of eigenvalues and the columns of are the matching eigenvectors. It needs two distinct real eigenvalues for a matrix. Then , and is found by raising each diagonal entry of to the power .
e.g. For , and .
Worked example, step by step
The question Calculator needed [6 marks]
The numbers of animals, in hundreds, of two species in a nature reserve in year are and . They are modelled by
(a) Show that the eigenvalues of satisfy .
(b) Find the eigenvalues of .
(c) Find an eigenvector of for the larger eigenvalue, with second component .
Worked solution: worked example
Answer: (b) and (c)
Step 1 - Write the characteristic equation.
The eigenvalues satisfy : M1 - Use
Why? An eigenvector satisfies with not zero, which is only possible when has no inverse, that is when its determinant is zero.
Step 2 - Expand the determinant.
So , as required. A1 - Expand to
Why? The number is the trace of (the sum of the diagonal entries) and is , which gives a quick check.
Step 3 - Solve for the eigenvalues.
Enter the quadratic in the polynomial solver, or use the eigenvalue command with entered as a matrix. The calculator gives A1 - A1 -
Why? Both are real and different, so can be diagonalised. The calculator may return them in either order.
Step 4 - Find the eigenvector for .
The first row gives , so . With second component , M1 - Use A1 -
Why? The second row is times the first, so it gives the same equation. Any non-zero multiple of is also an eigenvector, which is why the question fixes the second component. Check: .
M1 Use
A1 Expand to
A1
A1
M1 Use
A1
Now you try: enter your answers to be marked
Worked solution: practice question 1
Worked solution: practice question 2
Worked solution: practice question 3
Your score so far: 0 out of 13 marks
Calculator steps: Eigenvalues and eigenvectors
Common mistakes
- Forgetting to subtract from the whole matrix. Only the diagonal entries of change when forming - the off-diagonal entries stay exactly as they were.
- Stopping after finding the eigenvalues. A question asking for eigenvectors needs you to substitute each back into and solve - the eigenvalues alone aren't the full answer.
- Assuming an eigenvector answer is unique. Any non-zero scalar multiple of a valid eigenvector, such as instead of , is equally correct - don't second-guess a "different" answer that's really the same direction.
Using your GDC
The exact key presses for the TI-84 Plus CE, Casio fx-CG50, Casio fx-CG100 and TI-Nspire CX, with what the screen shows. Pick your calculator.
Matrix operations and solving systems
Used in: Matrix operations, Determinants and inverses, Solving systems with matrices
How to use matrices on a TI-84 Plus CE
Enter a matrix | |
Press 2nd x⁻¹ (MATRIX), press ▶ twice to reach EDIT, choose 1:[A] and press enter. Type the size, 2 enter 2 enter for 2 rows and 2 columns, then type the numbers row by row, pressing enter after each one. Use (−) for a negative number. |
MATRIX[A] 2 ×2 [[2 1] [1 3]] |
Enter the second matrix the same way in 2:[B] and the right-hand side as a 2 by 1 matrix in 3:[C]. Press 2nd mode (QUIT) when you have finished. |
MATRIX[C] 2 ×1 [[5] [10]] |
Add, multiply, determinant and inverse | |
On the home screen press 2nd x⁻¹ (MATRIX), choose 1:[A] from the NAMES list and press enter. Then press +, paste [B] in the same way, and press enter. A matrix name can only be pasted from this menu, not typed. Use × instead of + to multiply. and . |
[A]+[B] [[3 3] [4 7]] [A]*[B] [[5 8] [10 14]] |
For the determinant, press 2nd x⁻¹ (MATRIX), press ▶ to reach MATH, choose 1:det(, paste [A] from NAMES, type ) and press enter. . |
det([A]) 5 |
For the inverse, paste [A], press x⁻¹, then enter. The answer is in decimals. To see fractions, press math, choose 1:▶Frac and press enter. , which is in decimal form. |
[A]-1 [[0.6 −0.2] [−0.2 0.4]] Ans▶Frac [[3/5 −1/5] [−1/5 2/5]] |
Solve a system with the inverse | |
To solve , paste [A], press x⁻¹, then ×, paste [C] and press enter. The inverse must come first: is not the same as . and . |
[A]-1*[C] [[1] [3]] |
Paste matrix names from the MATRIX menu rather than typing them, and put the inverse on the left when you solve a system.
The full guide: Matrix operations and solving systems
Solve a system of equations
Used in: Solving systems with matrices
How to solve a system of equations on a TI-84 Plus CE
Simultaneous Equation Solver app (PlySmlt2) | |
Press apps and choose PlySmlt2. An information screen appears: press any key to reach the MAIN MENU, then choose Simultaneous Eqn Solver. |
|
On the mode screen choose 3 equations and 3 unknowns. Choose Dec instead of Auto if you want decimal answers rather than fractions. Choose NEXT, using the key directly below it on the screen. |
Equations: 3 Unknowns: 3 |
Enter the coefficients row by row, one row for each equation, with the constant (the number on the right of the equals sign) last. Press enter after each number to move to the next position. For a negative number use (−), not the subtraction key. Write each equation as first: a missing term has coefficient 0. |
1 2 3 10 2 -1 1 3 3 1 -2 1 |
Choose SOLVE, using the key directly below it on the screen. The solution for each unknown is shown. , and , which is , and in decimal form. |
x1=6/5 x2=7/5 x3=2 |
If the system has no solution or infinitely many solutions, the app does not show a single answer. The rref choice then shows the reduced row-echelon form, where a row of zeros followed by a non-zero number means no solution. To leave the app, go to the main menu and choose Quit App. | |
Check each solution by substituting it back into one of the original equations, in case a coefficient was typed in the wrong place.
The full guide: Solve a system of equations
Eigenvalues and eigenvectors
Used in: Eigenvalues and eigenvectors
How to find eigenvalues and eigenvectors on a TI-84 Plus CE
No eigenvalue command: characteristic equation and rref | |
Press 2nd x⁻¹ (MATRIX), press ▶ to the EDIT menu and choose 1:[A]. Enter the size, 2 enter 2 enter, then the entries row by row, pressing enter after each: 6, 2, 1, 5. Press 2nd mode (QUIT) to leave the editor. |
MATRIX[A] 2 ×2 [ 6 2 ] [ 1 5 ] |
The manual lists no eigenvalue or eigenvector command for this calculator, so the eigenvalues come from the characteristic equation. For a matrix it is . Here the trace is and the determinant is , so it is . Press apps and choose PlySmlt2, press any key, then choose 1:Polynomial Root Finder. Set ORDER to 2, press graph under NEXT, and enter the coefficients 1 enter, (−) 1 1 enter, 2 8 enter. Press graph under SOLVE. The eigenvalues are and . |
X1=4 X2=7 |
For an eigenvector, row-reduce . Quit the app, then on the home screen press 2nd x⁻¹ (MATRIX), ▶ to MATH, and choose B:rref(. Type [A] from 2nd x⁻¹ (MATRIX) 1:[A], then − 7 ×, and choose 5:identity( from the same MATH menu, followed by 2 ) ) and enter. This is rref([A]-7*identity(2)) for . Each row of the result is an equation in and . means , so and an eigenvector for is . Repeat with in place of : the result means , so an eigenvector is . |
rref([A]-7*identity(2)) [[1 -2] [0 0]] |
Any non-zero multiple of an eigenvector is also an eigenvector, so (2, 1) and (4, 2) are equally correct. The identity size must match the matrix: identity(2) for a 2 by 2.
The full guide: Eigenvalues and eigenvectors
See the full list of GDC guides for every calculator task.
Syllabus content covered
| Code | Syllabus content |
|---|---|
| AHL1.14 | Definition of a matrix: the terms element, row, column and order for matrices. Algebra of matrices: equality; addition; subtraction; multiplication by a scalar for matrices (including use of technology). Multiplication of matrices (multiplying matrices to solve practical problems). Properties of matrix multiplication: associativity, distributivity and non-commutativity. Identity and zero matrices (students should be familiar with the notation and ). Determinants and inverses of matrices with technology, and by hand for matrices. Awareness that a system of linear equations can be written in the form . Solution of the systems of equations using inverse matrix. In examinations will always be an invertible matrix, except when solving for eigenvectors. |
| AHL1.15 | Eigenvalues and eigenvectors. Characteristic polynomial of matrices. Diagonalization of matrices (restricted to the case where there are distinct real eigenvalues). Applications to powers of matrices: , where is a matrix of eigenvectors, and is a diagonal matrix of eigenvalues. Students will only be expected to perform calculations by hand and with technology for matrices. |
Official IB source: Mathematics: applications and interpretation subject brief (PDF, ibo.org).
Quick questions
How do you multiply two matrices together?
Multiply each row of the first matrix by each column of the second, summing the products, so entry of the result is row of dotted with column of . This only works when the columns of match the rows of .
What is the formula for the determinant of a 2x2 matrix?
For , .
How do you solve a system of equations using matrices?
Write the system as , then solve for by computing . On an IB exam, will always be invertible unless you are specifically solving for eigenvectors.
How do you find the eigenvalues of a 2x2 matrix?
Solve the characteristic equation . This expands to a quadratic in ; its two roots are the eigenvalues.
When can two matrices be added?
Only when they have the same order, because addition works entry by entry. A matrix and a matrix cannot be added.
What is the formula for the inverse of a 2x2 matrix?
- swap the leading diagonal, negate the other two entries, then divide by the determinant. It only exists when the determinant is not zero.
What does it mean if the coefficient matrix has determinant zero?
A determinant of zero means the matrix is singular and has no inverse, so the system has no unique solution - it is either inconsistent (no solutions) or dependent (infinitely many).
How do you find an eigenvector once you know an eigenvalue?
Substitute the eigenvalue into and solve the resulting equations for . Any non-zero scalar multiple of the resulting vector is a valid eigenvector.
What is the order of a product of two matrices?
If has order and has order , then has order . For example, a matrix times a matrix gives a matrix.
Can a determinant be negative?
Yes. A negative determinant is perfectly valid and the matrix still has an inverse. For , and the inverse is .
Ready to practise properly?
Practice questions on every section, marked instantly like the real exam.