Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

“In mathematics you don’t understand things. You just get used to them.”

John von Neumann

Matrix multiplication provides one of the most powerful and systematic approaches to analyzing optical systems. Far from being merely computational shortcuts, matrices encode the fundamental transformations that light undergoes, revealing deep connections between seemingly different optical phenomena. This appendix will guide you through matrix operations with a focus on their physical meaning in optics, building from basic concepts to sophisticated applications in polarization and ray optics.

1What Are Matrices and Why Do We Need Them in Optics?

1.1The Power of Linear Transformations

Most optical phenomena can be described as linear transformations—processes that take input light and produce output light in a predictable, systematic way. Consider some common examples:

Each of these transformations can be represented mathematically as a matrix operation, where the input state is multiplied by a transformation matrix to yield the output state.

1.2Matrix Basics: Structure and Notation

A matrix is a rectangular array of numbers arranged in rows and columns. For optics, we primarily work with 2×2 matrices (for polarization) and 2×2 matrices (for ray optics):

M=(m11m12m21m22)\mathbf{M} = \begin{pmatrix} m_{11} & m_{12} \\ m_{21} & m_{22} \end{pmatrix}

1.3Vectors: Representing Optical States

In matrix optics, we represent physical states as column vectors:

Polarization States (Jones vectors):

E=(ExEy)\vec{E} = \begin{pmatrix} E_x \\ E_y \end{pmatrix}

Ray States (ray vectors):

r=(yθ)\vec{r} = \begin{pmatrix} y \\ \theta \end{pmatrix}

where yy is the ray height and θ\theta is the ray angle.

1.4Why Matrix Multiplication Works for Optics

The reason matrices are so powerful in optics is that optical systems are compositional: if you have two optical elements in series, the combined effect is the product of their individual effects. Mathematically:

If element A transforms state s1\vec{s}_1 to s2\vec{s}_2: s2=As1\vec{s}_2 = \mathbf{A}\vec{s}_1 And element B transforms state s2\vec{s}_2 to s3\vec{s}_3: s3=Bs2\vec{s}_3 = \mathbf{B}\vec{s}_2

Then the combined transformation is: s3=B(As1)=(BA)s1\vec{s}_3 = \mathbf{B}(\mathbf{A}\vec{s}_1) = (\mathbf{B}\mathbf{A})\vec{s}_1

The combined system has matrix BA\mathbf{BA}—the product of the individual matrices.

2Matrix Multiplication: Rules and Mechanics

2.1The Fundamental Rule

Matrix multiplication follows a specific pattern. For matrices A\mathbf{A} and B\mathbf{B}:

(AB)ij=kAikBkj(\mathbf{AB})_{ij} = \sum_{k} A_{ik}B_{kj}

In plain English: to get element (i,j)(i,j) of the product, take the dot product of row ii from the first matrix with column jj from the second matrix.

2.2Step-by-Step Process for 2×2 Matrices

For two 2×2 matrices:

A=(a11a12a21a22),B=(b11b12b21b22)\mathbf{A} = \begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix}, \quad \mathbf{B} = \begin{pmatrix} b_{11} & b_{12} \\ b_{21} & b_{22} \end{pmatrix}

The product C=AB\mathbf{C} = \mathbf{AB} has elements:

C=(a11b11+a12b21a11b12+a12b22a21b11+a22b21a21b12+a22b22)\mathbf{C} = \begin{pmatrix} a_{11}b_{11} + a_{12}b_{21} & a_{11}b_{12} + a_{12}b_{22} \\ a_{21}b_{11} + a_{22}b_{21} & a_{21}b_{12} + a_{22}b_{22} \end{pmatrix}

2.3Matrix-Vector Multiplication

When multiplying a matrix by a vector:

Av=(a11a12a21a22)(v1v2)=(a11v1+a12v2a21v1+a22v2)\mathbf{A}\vec{v} = \begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix} \begin{pmatrix} v_1 \\ v_2 \end{pmatrix} = \begin{pmatrix} a_{11}v_1 + a_{12}v_2 \\ a_{21}v_1 + a_{22}v_2 \end{pmatrix}

This is how we transform optical states—the matrix represents the optical element, and the vector represents the light state.

2.4Important Properties of Matrix Multiplication

Table 1:Matrix Multiplication Properties

Property

Mathematical Statement

Physical Meaning

Associative

(AB)C=A(BC)(\mathbf{AB})\mathbf{C} = \mathbf{A}(\mathbf{BC})

Order of grouping doesn’t matter

Not Commutative

ABBA\mathbf{AB} \neq \mathbf{BA} (usually)

Order of optical elements matters!

Identity Element

AI=IA=A\mathbf{AI} = \mathbf{IA} = \mathbf{A}

Identity represents “do nothing”

Distributive

A(B+C)=AB+AC\mathbf{A}(\mathbf{B} + \mathbf{C}) = \mathbf{AB} + \mathbf{AC}

Superposition principle

3Special Matrices in Optics

3.1The Identity Matrix

The identity matrix represents “no change”:

I=(1001)\mathbf{I} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}

For any matrix A\mathbf{A} or vector v\vec{v}:

Physical meaning: An optical element that doesn’t change the light state (like a perfect window or empty space).

3.2Rotation Matrices

A rotation matrix rotates vectors by angle θ\theta:

R(θ)=(cosθsinθsinθcosθ)\mathbf{R}(\theta) = \begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix}

3.3Inverse Matrices

The inverse of matrix A\mathbf{A} is denoted A1\mathbf{A}^{-1} and satisfies:

AA1=A1A=I\mathbf{A}\mathbf{A}^{-1} = \mathbf{A}^{-1}\mathbf{A} = \mathbf{I}

For a 2×2 matrix:

A1=1det(A)(a22a12a21a11)\mathbf{A}^{-1} = \frac{1}{\det(\mathbf{A})} \begin{pmatrix} a_{22} & -a_{12} \\ -a_{21} & a_{11} \end{pmatrix}

where det(A)=a11a22a12a21\det(\mathbf{A}) = a_{11}a_{22} - a_{12}a_{21} is the determinant.

Physical meaning: The inverse represents the “reverse” operation—if a matrix transforms state A to state B, its inverse transforms state B back to state A.

4Jones Matrices: Polarization Optics

4.1Representing Polarized Light

In Jones calculus, we represent polarized light as a complex 2D vector:

E=(ExEy)=(ExeiϕxEyeiϕy)\vec{E} = \begin{pmatrix} E_x \\ E_y \end{pmatrix} = \begin{pmatrix} E_x e^{i\phi_x} \\ E_y e^{i\phi_y} \end{pmatrix}

Table 2:Common Polarization States

Polarization Type

Jones Vector

Physical Description

Horizontal linear

(10)\begin{pmatrix} 1 \\ 0 \end{pmatrix}

Electric field oscillates in x-direction

Vertical linear

(01)\begin{pmatrix} 0 \\ 1 \end{pmatrix}

Electric field oscillates in y-direction

45° linear

12(11)\frac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ 1 \end{pmatrix}

Equal x and y components, in phase

Right circular

12(1i)\frac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ -i \end{pmatrix}

x leads y by 90°

Left circular

12(1i)\frac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ i \end{pmatrix}

y leads x by 90°

4.2Jones Matrices for Common Optical Elements

Linear Polarizer (transmission axis at angle θ\theta):

P(θ)=(cos2θcosθsinθcosθsinθsin2θ)\mathbf{P}(\theta) = \begin{pmatrix} \cos^2\theta & \cos\theta\sin\theta \\ \cos\theta\sin\theta & \sin^2\theta \end{pmatrix}

Special cases:

Quarter-Wave Plate (fast axis at angle θ\theta):

Q(θ)=R(θ)(100i)R(θ)\mathbf{Q}(\theta) = \mathbf{R}(-\theta) \begin{pmatrix} 1 & 0 \\ 0 & i \end{pmatrix} \mathbf{R}(\theta)

Half-Wave Plate (fast axis at angle θ\theta):

H(θ)=R(θ)(1001)R(θ)\mathbf{H}(\theta) = \mathbf{R}(-\theta) \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} \mathbf{R}(\theta)

4.3Worked Example: Polarization Analysis

4.4Complex Polarization States

Real optical systems often involve complex Jones matrices with both real and imaginary elements:

5Ray Transfer Matrices: Geometrical Optics

5.1The ABCD Matrix Formalism

In geometrical optics, we can represent ray propagation using 2×2 matrices. A ray is characterized by:

r=(yθ)\vec{r} = \begin{pmatrix} y \\ \theta \end{pmatrix}

An optical element transforms the ray according to:

rout=(ABCD)rin=(ABCD)(yinθin)\vec{r}_{out} = \begin{pmatrix} A & B \\ C & D \end{pmatrix}\vec{r}_{in} = \begin{pmatrix} A & B \\ C & D \end{pmatrix}\begin{pmatrix} y_{in} \\ \theta_{in} \end{pmatrix}

5.2ABCD Matrices for Common Elements

Table 3:Ray Transfer Matrices

Optical Element

ABCD Matrix

Physical Effect

Free space (distance d)

(1d01)\begin{pmatrix} 1 & d \\ 0 & 1 \end{pmatrix}

Ray height changes, angle unchanged

Thin lens (focal length f)

(101/f1)\begin{pmatrix} 1 & 0 \\ -1/f & 1 \end{pmatrix}

Height unchanged, angle changes

Curved mirror (radius R)

(102/R1)\begin{pmatrix} 1 & 0 \\ -2/R & 1 \end{pmatrix}

Reflection and focusing

Flat interface (n₁ to n₂)

(100n1/n2)\begin{pmatrix} 1 & 0 \\ 0 & n_1/n_2 \end{pmatrix}

Refraction changes angle

5.3System Analysis Using Matrix Products

For multiple elements in series, multiply their matrices in reverse order:

Mtotal=MNMN1M2M1\mathbf{M}_{total} = \mathbf{M}_N \mathbf{M}_{N-1} \cdots \mathbf{M}_2 \mathbf{M}_1

5.4Physical Meaning of ABCD Elements

Each element of the ABCD matrix has physical significance:

(youtθout)=(ABCD)(yinθin)\begin{pmatrix} y_{out} \\ \theta_{out} \end{pmatrix} = \begin{pmatrix} A & B \\ C & D \end{pmatrix}\begin{pmatrix} y_{in} \\ \theta_{in} \end{pmatrix}

6Practical Applications and Examples

6.1Polarization State Analysis

6.2Optical System Design

7Common Pitfalls and How to Avoid Them

7.1Order of Operations

7.2Sign Conventions

7.3Physical Interpretation

7.4Complex vs. Real Matrices

8Matrix Multiplication Techniques and Shortcuts

8.1Special Matrix Products

Rotation matrices:

R(α)R(β)=R(α+β)\mathbf{R}(\alpha)\mathbf{R}(\beta) = \mathbf{R}(\alpha + \beta)

Translation matrices:

(1d101)(1d201)=(1d1+d201)\begin{pmatrix} 1 & d_1 \\ 0 & 1 \end{pmatrix}\begin{pmatrix} 1 & d_2 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} 1 & d_1 + d_2 \\ 0 & 1 \end{pmatrix}

Thin lens combinations: Two thin lenses in contact: Ltotal=L2L1\mathbf{L}_{total} = \mathbf{L}_2\mathbf{L}_1

(101/f21)(101/f11)=(101/feff1)\begin{pmatrix} 1 & 0 \\ -1/f_2 & 1 \end{pmatrix}\begin{pmatrix} 1 & 0 \\ -1/f_1 & 1 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ -1/f_{eff} & 1 \end{pmatrix}

where 1feff=1f1+1f2\frac{1}{f_{eff}} = \frac{1}{f_1} + \frac{1}{f_2} (thin lens equation!)

8.2Computational Tips

For hand calculations:

  1. Look for patterns (identity elements, zeros)

  2. Factor common terms

  3. Use special properties (orthogonal, symmetric matrices)

  4. Check dimensions and units at each step

For computer calculations:

import numpy as np

# Define matrices
A = np.array([[1, 2], [3, 4]])
B = np.array([[5, 6], [7, 8]])

# Matrix multiplication
C = A @ B  # or np.dot(A, B)

9Summary and Physical Insights

9.1Why Matrix Methods Work So Well

Matrix multiplication succeeds in optics because:

Table 4:Fundamental Reasons for Matrix Success

Mathematical Property

Physical Principle

Optical Example

Linearity

Superposition of waves

Interference, diffraction

Composition

Sequential operations

Multi-element systems

Group structure

Reversibility

Time-reversed paths

Representation theory

Symmetries

Crystal optics, polarization

9.2Connections to Other Physics

Quantum Mechanics: Matrix methods in optics directly parallel quantum mechanical operators acting on state vectors.

Classical Mechanics: ABCD matrices are analogous to transfer matrices in mechanical vibrations and electrical circuits.

Signal Processing: Jones matrices operate on complex signals just like digital filters operate on electronic signals.

9.3Practical Benefits

10Practice Problems

10.1Basic Matrix Operations

10.2Polarization Analysis

10.3Ray Optics System

10.4System Design

11Solutions to Practice Problems

12Final Thoughts: The Elegance of Linear Algebra in Physics

Matrix multiplication reveals deep structural relationships in optics that would be nearly impossible to see otherwise. The mathematical framework doesn’t just make calculations easier—it reveals the underlying symmetries and conservation laws that govern how light behaves.

“Mathematics is the language with which God has written the universe.”

Galileo Galilei

As you continue studying optics, you’ll discover that matrix methods appear everywhere: from the simplest polarizer to the most sophisticated laser system. The investment in understanding these mathematical tools pays dividends throughout your career in optics and photonics.

Matrix multiplication in optics is more than a computational tool—it’s a window into the mathematical structure of the electromagnetic world. Master these methods, and you’ll have one of the most powerful techniques in all of physics at your command.