top of page
Inaugurated by IN-SPACe
ISRO Registered Space Tutor

S7-SA2-0219

What is the Application of Matrices in Markov Chains?

Grade Level:

Class 12

AI/ML, Physics, Biotechnology, FinTech, EVs, Space Technology, Climate Science, Blockchain, Medicine, Engineering, Law, Economics

Definition
What is it?

Matrices help us understand how things change over time in a Markov Chain. A Markov Chain describes a sequence of events where the chance of the next event depends only on the current event, not on what happened before. Matrices provide a powerful way to organize and calculate these probabilities.

Simple Example
Quick Example

Imagine your favourite chai stall has three types of chai: Masala, Ginger, and Elaichi. If a customer buys Masala chai today, there's a certain chance they'll buy Masala again tomorrow, or switch to Ginger, or Elaichi. A matrix can store all these 'switching' chances (probabilities) in a neat table.

Worked Example
Step-by-Step

Let's say a student's mood can be 'Happy' (H) or 'Sad' (S). If they are Happy today, there's a 70% chance they'll be Happy tomorrow and 30% chance they'll be Sad. If they are Sad today, there's a 40% chance they'll be Happy tomorrow and 60% chance they'll be Sad. We want to find the probability of being Happy or Sad after 2 days, starting from a Happy mood.

Step 1: Create the Transition Matrix (T). The rows represent 'from' states and columns represent 'to' states.
T = [[0.7, 0.3],
[0.4, 0.6]]
(Row 1: H to H, H to S; Row 2: S to H, S to S)
---
Step 2: Create the Initial State Vector (S0). Since the student starts Happy, S0 = [1, 0] (100% Happy, 0% Sad).
---
Step 3: Calculate the state after 1 day (S1) by multiplying S0 by T.
S1 = S0 * T = [1, 0] * [[0.7, 0.3],
[0.4, 0.6]]
S1 = [(1*0.7 + 0*0.4), (1*0.3 + 0*0.6)] = [0.7, 0.3]
So, after 1 day, there's a 70% chance of being Happy and 30% chance of being Sad.
---
Step 4: Calculate the state after 2 days (S2) by multiplying S1 by T.
S2 = S1 * T = [0.7, 0.3] * [[0.7, 0.3],
[0.4, 0.6]]
S2 = [(0.7*0.7 + 0.3*0.4), (0.7*0.3 + 0.3*0.6)]
S2 = [(0.49 + 0.12), (0.21 + 0.18)]
S2 = [0.61, 0.39]
---
Answer: After 2 days, starting from a Happy mood, there is a 61% chance of being Happy and a 39% chance of being Sad.

Why It Matters

Understanding matrix applications in Markov Chains is key for building AI/ML models that predict future trends, like stock prices or customer behaviour. It's used by data scientists to forecast weather, by engineers to design reliable systems, and even in medicine to model disease spread. This knowledge opens doors to exciting careers in FinTech, AI, and healthcare.

Common Mistakes

MISTAKE: Swapping rows and columns in the transition matrix, or misplacing probabilities. | CORRECTION: Always define clearly what your rows (from state) and columns (to state) represent before filling the matrix.

MISTAKE: Forgetting that probabilities in each row of the transition matrix must sum to 1. | CORRECTION: Double-check that the sum of probabilities for each 'from' state equals 1 (or 100%).

MISTAKE: Multiplying the matrices in the wrong order (e.g., T * S0 instead of S0 * T for state prediction). | CORRECTION: Remember that the initial state vector (or previous state vector) always comes first when multiplying by the transition matrix to find the next state.

Practice Questions
Try It Yourself

QUESTION: A small village has two weather states: Sunny (S) and Cloudy (C). If it's Sunny today, there's an 80% chance it's Sunny tomorrow. If it's Cloudy today, there's a 60% chance it's Cloudy tomorrow. What is the transition matrix for this Markov Chain? | ANSWER: [[0.8, 0.2], [0.4, 0.6]]

QUESTION: Using the weather transition matrix from Q1, if today is Sunny, what is the probability that it will be Sunny after 2 days? | ANSWER: 0.72 (or 72%)

QUESTION: A student can choose between studying 'Maths' or 'Science'. If they study Maths today, there's a 60% chance they study Maths tomorrow. If they study Science today, there's an 80% chance they study Science tomorrow. If they start by studying Maths, what is the probability that they will be studying Science after 3 days? | ANSWER: 0.244 (or 24.4%)

MCQ
Quick Quiz

Which of the following is NOT a property of a Markov Chain transition matrix?

All elements are non-negative.

The sum of elements in each row is 1.

The sum of elements in each column is 1.

It is a square matrix.

The Correct Answer Is:

C

In a transition matrix, each row represents the probabilities of moving from a specific state to all other possible states, so the sum of probabilities in each row must be 1. The sum of columns does not necessarily have to be 1.

Real World Connection
In the Real World

Matrices in Markov Chains are used by companies like Netflix or Amazon to predict what movie you might watch next or what product you might buy, based on your past choices. In India, this helps e-commerce platforms like Flipkart personalize your shopping experience, or even predict traffic flow in big cities like Mumbai or Bengaluru to manage congestion.

Key Vocabulary
Key Terms

MARKOV CHAIN: A sequence of events where the probability of the next event depends only on the current event. | TRANSITION MATRIX: A square matrix containing the probabilities of moving from one state to another. | STATE VECTOR: A row matrix that represents the probabilities of being in each state at a particular time. | PROBABILITY: The likelihood of an event occurring, usually a number between 0 and 1.

What's Next
What to Learn Next

Next, explore 'Steady-State Vectors' in Markov Chains. This concept builds on what you've learned by showing how systems eventually reach a stable long-term probability distribution, which is super useful for understanding long-term predictions in many real-world scenarios!

bottom of page