Welcome to the World of Matrices!

In this chapter, we are going to learn how to organize numbers into grids called matrices. While they might look like simple tables, matrices are incredibly powerful tools used in computer graphics, engineering, and predicting how populations change over time. If you have ever wondered how a search engine ranks pages or how weather models work, you are looking at the power of matrices!

1. Matrix Basics: The Building Blocks

A matrix is simply a rectangular array of numbers arranged in rows (horizontal) and columns (vertical).

Order and Equality

The order (or size) of a matrix is written as \(m \times n\), where \(m\) is the number of rows and \(n\) is the number of columns.
Example: A matrix with 2 rows and 3 columns has order \(2 \times 3\).
Two matrices are equal only if they have the same order and every corresponding element is identical.

Addition and Subtraction

To add or subtract matrices, they must have the same order. You simply add or subtract the numbers in the same positions.
\( \begin{pmatrix} a & b \\ c & d \end{pmatrix} + \begin{pmatrix} e & f \\ g & h \end{pmatrix} = \begin{pmatrix} a+e & b+f \\ c+g & d+h \end{pmatrix} \)

Scalar Multiplication

This is when you multiply a matrix by a single number (a scalar). Every single entry inside the matrix gets multiplied by that number.
\( k \begin{pmatrix} a & b \\ c & d \end{pmatrix} = \begin{pmatrix} ka & kb \\ kc & kd \end{pmatrix} \)

Matrix Multiplication (The "Row by Column" Rule)

Multiplying two matrices is a bit different. You multiply the rows of the first matrix by the columns of the second.
Important Rule: To multiply matrix \(A\) and \(B\), the number of columns in \(A\) must equal the number of rows in \(B\).
Non-commutativity: In regular math, \(3 \times 5 = 5 \times 3\). In matrices, \(AB\) is usually not the same as \(BA\)!

Special Matrices

  • Zero Matrix (\(0\)): A matrix where every entry is \(0\).
  • Identity Matrix (\(I\)): A square matrix with \(1\)s on the main diagonal (top-left to bottom-right) and \(0\)s everywhere else. Multiplying a matrix by \(I\) is like multiplying a number by \(1\); it doesn't change anything!

Key Takeaway: Always check the "inner dimensions" before multiplying. A \((2 \times 3)\) matrix can multiply a \((3 \times 4)\) matrix, resulting in a \((2 \times 4)\) matrix.

2. Determinants and Inverses

The determinant is a special number calculated from a square matrix that tells us if the matrix has an "inverse."

The \(2 \times 2\) Case (By Hand)

For a matrix \(A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}\):
The determinant is \(\det(A) = ad - bc\).
The inverse, \(A^{-1}\), is given by:
\(A^{-1} = \frac{1}{\det(A)} \begin{pmatrix} d & -b \\ -c & a \end{pmatrix} \)
Note: If \(\det(A) = 0\), the matrix is "singular" and has no inverse.

Using Technology

For larger matrices (\(3 \times 3\) or higher), your Graphic Display Calculator (GDC) is your best friend. You are expected to use it to find determinants and inverses for larger systems.

Solving Systems of Equations

We can write a system of linear equations as \(Ax = b\). To solve for the variables in \(x\), we use the inverse:
\(x = A^{-1}b\)

Quick Review: To find the inverse of a \(2 \times 2\), swap the main diagonal elements, flip the signs of the others, and divide everything by the determinant.

3. Eigenvalues and Eigenvectors

This sounds intimidating, but think of it this way: usually, when you multiply a vector by a matrix, the vector rotates and changes length. But for certain special vectors, the matrix only stretches or shrinks them—it doesn't rotate them at all! These are eigenvectors, and the amount they stretch by is the eigenvalue (\(\lambda\)).

The Characteristic Equation

To find the eigenvalues of a \(2 \times 2\) matrix \(A\), we solve the characteristic polynomial:
\(\det(A - \lambda I) = 0\)
This usually results in a quadratic equation for \(\lambda\).

Diagonalization

If a \(2 \times 2\) matrix \(A\) has two distinct real eigenvalues, we can write it as:
\(A = PDP^{-1}\)
Where:
- \(D\) is a diagonal matrix with the eigenvalues on the diagonal.
- \(P\) is a matrix where the columns are the corresponding eigenvectors.

Powers of Matrices

Calculating \(A^{100}\) by hand would be a nightmare. But with diagonalization, it’s easy!
\(A^k = P D^k P^{-1}\)
Since \(D\) is diagonal, \(D^k\) just means raising the individual eigenvalues to the power of \(k\).

Did you know? This process is how scientists predict long-term trends in complex systems without doing thousands of individual calculations!

4. Markov Chains

A Markov Chain is a mathematical system that transitions from one state to another based on certain probability rules. The key rule is that the next state depends only on the current state, not the history.

Transition Matrices

We use a transition matrix (\(T\)) to show the probability of moving between states. Each column in a transition matrix must add up to \(1\) (because probabilities must total \(100\%\)).

The State Vector

The state of the system at any time \(n\) is represented by a state probability matrix \(s_n\).
To find the next state: \(s_{n+1} = T s_n\).
To find the state after \(k\) steps: \(s_k = T^k s_0\).

Steady State (Long-term Behavior)

For many regular Markov chains, the system eventually settles into a steady state where it no longer changes, even if you keep multiplying by \(T\).
Mathematically, the steady state vector \(s\) satisfies: \(Ts = s\).
On your GDC, you can often find this by raising the transition matrix \(T\) to a very large power (like \(T^{50}\)).

Common Mistake: Make sure you set up your transition matrix correctly. IB usually follows the convention where the "current state" is the column and the "next state" is the row (though always check the context of the question!).

Summary & Key Takeaways

  • Matrix Multiplication: Order matters! \(AB \neq BA\).
  • Inverse: Exists only if \(\det(A) \neq 0\). Use \(x = A^{-1}b\) to solve equations.
  • Eigenvalues: Solve \(\det(A - \lambda I) = 0\). They represent the "scaling factor" of the matrix.
  • Powers: Use \(A^k = P D^k P^{-1}\) for high powers.
  • Markov Chains: Use \(T^k s_0\) to predict the future and look for the steady state for long-term behavior.

Don't worry if eigenvalues feel a bit abstract at first. Practice with your GDC to see how the numbers behave, and the patterns will start to make sense!