In my decade teaching IB Maths, I have observed a recurring pattern among HL AI students. Certain topics capture immediate attention: calculus applications, statistical modeling, optimization. These areas feel central, high-stakes. But then there are the quiet achievers, the topics that underpin much of real-world AI modeling yet often get overlooked until the eleventh hour. For HL AI, none fits this description better than matrices and Markov chains.
My students frequently underestimate the depth and breadth of this topic. They might do a few textbook problems, get the basic mechanics, and then move on, assuming it will be a minor part of their exams. This is a mistake. Matrices are more than just a tool for solving systems of linear equations; they are the language of dynamic systems, and Markov chains are a powerful application for modeling real-world transitions and predicting long-term behaviour.
The Foundation: Matrix Algebra Refresher
Before we dive into Markov chains, we must solidify our understanding of matrices themselves. Many students encounter matrices in the context of solving simultaneous linear equations using technology, such as the TI-84 or the ClassPad 330. While this is a valid application, the IB HL AI course demands more. You need to understand the underlying operations without relying solely on a calculator for every step.
A matrix is a rectangular array of numbers. Its dimensions are crucial, expressed as rows $\times$ columns. We manipulate matrices through several fundamental operations:
- Addition and Subtraction: Only possible if matrices have identical dimensions. You simply add or subtract corresponding elements. For example, if $A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}$ and $B = \begin{pmatrix} e & f \\ g & h \end{pmatrix}$, then $A+B = \begin{pmatrix} a+e & b+f \\ c+g & d+h \end{pmatrix}$.
- Scalar Multiplication: Multiplying every element of a matrix by a single number. For instance, $2A = \begin{pmatrix} 2a & 2b \\ 2c & 2d \end{pmatrix}$.
- Matrix Multiplication: This is where it gets complex and where understanding is paramount for Markov chains. If you have a matrix $A$ of dimension $m \times n$ and a matrix $B$ of dimension $n \times p$, their product $AB$ will have dimension $m \times p$. The critical condition is that the number of columns in the first matrix ($A$) must equal the number of rows in the second matrix ($B$). Each element in the resulting matrix is found by taking the dot product of a row from the first matrix and a column from the second. I have often seen students struggle with the order of multiplication, so always remember: rows of the first, columns of the second. For more detailed explanations and examples of these operations, I recommend reviewing your study notes on matrices.
Entering the Dynamic World: What are Markov Chains?
A Markov chain is a mathematical model that describes a sequence of possible events where the probability of each event depends only on the state attained in the previous event. This property is called "memoryless." It means the past history beyond the immediate previous state does not influence the future. This makes them incredibly useful for modeling systems where transitions occur between distinct states.
Imagine a simple scenario: a student's study habits. They can be in one of two states: "Studying" or "Not Studying." We can define probabilities for transitioning between these states. For example:
- If they are "Studying" today, there's an $80\%$ chance they will be "Studying" tomorrow and a $20\%$ chance they will be "Not Studying" tomorrow.
- If they are "Not Studying" today, there's a $40\%$ chance they will be "Studying" tomorrow and a $60\%$ chance they will be "Not Studying" tomorrow.
We can represent these transition probabilities in a transition matrix, $T$. The rows represent the "from" state, and columns represent the "to" state. Conventionally, we list the states in the same order for rows and columns:
$T = \begin{pmatrix} 0.8 & 0.2 \\ 0.4 & 0.6 \end{pmatrix}$
Here, the first row is "From Studying," and the second row is "From Not Studying." The first column is "To Studying," and the second column is "To Not Studying." Notice that the sum of probabilities in each row must equal 1.
To predict the state distribution after one step, we use a state vector, $S_n = \begin{pmatrix} P(\text{state 1}) & P(\text{state 2}) & \dots \end{pmatrix}$. If today, $S_0 = \begin{pmatrix} 1 & 0 \end{pmatrix}$ (meaning the student is definitely Studying), then tomorrow's probabilities, $S_1$, are calculated as:
$S_1 = S_0 T = \begin{pmatrix} 1 & 0 \end{pmatrix} \begin{pmatrix} 0.8 & 0.2 \\ 0.4 & 0.6 \end{pmatrix} = \begin{pmatrix} (1 \times 0.8 + 0 \times 0.4) & (1 \times 0.2 + 0 \times 0.6) \end{pmatrix} = \begin{pmatrix} 0.8 & 0.2 \end{pmatrix}$
This tells us there's an $80\%$ chance they'll be Studying and a $20\%$ chance they'll be Not Studying tomorrow. To find the distribution after $n$ steps, we simply multiply by $T$ repeatedly: $S_n = S_0 T^n$. My students often find matrix exponentiation with a calculator straightforward, but understanding *why* it works is key.
The Long Term: Steady State Vectors
One of the most powerful aspects of Markov chains, and a frequent focus in HL AI exams, is the concept of a steady state (also known as the equilibrium distribution). This is the long-term probability distribution of the states, assuming the transitions continue indefinitely. At the steady state, the probability distribution no longer changes from one step to the next. If $S_{steady}$ is the steady state vector, then $S_{steady} = S_{steady} T$.
Let's find the steady state for our study habit example. Let $S_{steady} = \begin{pmatrix} x & y \end{pmatrix}$, where $x$ is the long-term probability of studying and $y$ is the long-term probability of not studying. We know $x+y=1$. So, $y = 1-x$. The equation becomes:
$\begin{pmatrix} x & y \end{pmatrix} = \begin{pmatrix} x & y \end{pmatrix} \begin{pmatrix} 0.8 & 0.2 \\ 0.4 & 0.6 \end{pmatrix}$
This gives us two simultaneous equations:
- $x = 0.8x + 0.4y$
- $y = 0.2x + 0.6y$
We only need one of these, along with $x+y=1$. Let's use the first equation:
$x = 0.8x + 0.4y$
$0.2x = 0.4y$
$x = 2y$
Now substitute $y = 1-x$ into this equation:
$x = 2(1-x)$
$x = 2 - 2x$
$3x = 2$
$x = \frac{2}{3}$
Since $y = 1-x$, we get $y = 1 - \frac{2}{3} = \frac{1}{3}$.
So, the steady state vector is $S_{steady} = \begin{pmatrix} \frac{2}{3} & \frac{1}{3} \end{pmatrix}$. This implies that in the long run, the student will spend approximately $66.7\%$ of their time studying and $33.3\%$ of their time not studying.
Why This Matters for Your IB Exam (HL AI Specific)
Students frequently overlook matrices and Markov chains because they don't immediately connect to the heavy statistics or calculus components. However, this topic is a cornerstone of mathematical modeling, which is central to the Applications and Interpretation (AI) course, particularly at HL.
In my classroom, I emphasize that these concepts appear in two critical ways:
- Paper 2: While less common than Paper 3, matrices for basic operations or solving simple systems can feature. Occasionally, a simpler Markov chain problem might appear, focusing on calculating a future state vector.
- Paper 3: This is where matrices and Markov chains truly shine and are often integrated into extended problem-solving scenarios. Paper 3 is designed to test your ability to apply mathematical concepts to unfamiliar situations and engage in in-depth analysis. Markov chains are perfect for this, allowing for questions that explore initial conditions, multi-step predictions, steady states, and the interpretation of these results in a real-world context (e.g., population dynamics, market share, disease spread, customer loyalty). A strong understanding here can be the difference between a solid grade and one that misses the mark.
Understanding Markov chains extends beyond just calculations. It develops your ability to model dynamic systems, make predictions, and interpret the long-term behaviour of those systems. These are core skills for any student pursuing further studies in data science, economics, operations research, or any field that relies on quantitative modeling. My advice to students is always to practice interpreting the meaning of the numbers they calculate. What does $P=0.67$ actually signify in the context of the problem?
Furthermore, HL AI relies heavily on graphic display calculators (GDCs). Using your GDC efficiently for matrix operations (inputting matrices, multiplying, finding inverses, raising to powers) is crucial for saving time and minimizing errors. Make sure you are proficient with your calculator's matrix functions. Our Casio fx-CG50 guide has dedicated sections on matrix operations that can help you master this.
Do not let the perceived "niche" nature of matrices and Markov chains fool you. They are powerful tools that fit perfectly into the HL AI syllabus's emphasis on modeling and problem-solving. Proactive study here will not only secure marks but also build a more comprehensive understanding of mathematical applications.
Want to actually drill this?
Every IB Maths topic on this page has a full practice engine at ibmathrevision.com — with AI grading trained on real IB mark schemes.
Get access →