Renjith Thazhathethil

Introduction to Linear Algebra

1. Motivation: From Single Equations to Coupled Systems

Linear algebra is often introduced through abstract definitions of vector spaces, linear transformations, and matrices. However, its most compelling intuition arises when solving dynamic problems—specifically, systems of differential equations.

1.1 The Uncoupled Case (A Single Degree of Freedom)

Consider the simplest first-order scalar differential equation:

dxdt=ax,x(0)=x0\frac{dx}{dt} = a x, \quad x(0) = x_0

wherea∈Ra \in \mathbb{R}is a constant. We can solve this immediately by separation of variables or an integrating factor:

x(t)=x0eatx(t) = x_0 e^{at}

The behavior is completely determined by the sign and magnitude ofaa:

Now, suppose we have two such independent processes:

dx1dt=ax1,x1(0)=x1,0dx2dt=bx2,x2(0)=x2,0\begin{aligned} \frac{dx_1}{dt} &= a x_1, \quad x_1(0) = x_{1,0} \\ \frac{dx_2}{dt} &= b x_2, \quad x_2(0) = x_{2,0} \end{aligned}

Because the equation forx1x_1does not involvex2x_2, and the equation forx2x_2does not involvex1x_1, the system is uncoupled. The solution is simply:

x1(t)=x1,0eat,x2(t)=x2,0ebtx_1(t) = x_{1,0} e^{at}, \quad x_2(t) = x_{2,0} e^{bt}

Solving uncoupled equations is straightforward because each variable evolves along its own independent one-dimensional direction.


1.2 The Coupled System

In reality, physical, economic, and biological systems rarely evolve in isolation. Quantities interact: predator and prey populations affect each other, heat diffuses between adjacent compartments, and currents in coupled electrical circuits influence one another.

Consider a simple linear system where the rate of change of each variable depends on both variables:

dx1dt=ax1+bx2dx2dt=cx1+dx2\begin{aligned} \frac{dx_1}{dt} &= a x_1 + b x_2 \\ \frac{dx_2}{dt} &= c x_1 + d x_2 \end{aligned}

with initial valuesx1(0)x_1(0)andx2(0)x_2(0).

Here, the equations are coupled wheneverb≠0b \neq 0orc≠0c \neq 0. We cannot solve forx1(t)x_1(t)without knowingx2(t)x_2(t), nor can we solve forx2(t)x_2(t)without knowingx1(t)x_1(t).


2. The Matrix Representation

We can organize this coupled system into a compact geometric language by grouping the state variables into a vectorx(t)∈R2\mathbf{x}(t) \in \mathbb{R}^2and the coupling coefficients into a matrixA∈M2(R)A \in M_2(\mathbb{R}):

x(t)=(x1(t)x2(t)),A=(abcd)\mathbf{x}(t) = \begin{pmatrix} x_1(t) \\ x_2(t) \end{pmatrix}, \quad A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}

The system of differential equations is written compactly as:

dxdt=Ax,x(0)=x0\frac{d\mathbf{x}}{dt} = A \mathbf{x}, \quad \mathbf{x}(0) = \mathbf{x}_0

Notice the striking resemblance between:

dxdt=axanddxdt=Ax\frac{dx}{dt} = a x \quad \text{and} \quad \frac{d\mathbf{x}}{dt} = A \mathbf{x}

IfAAis a diagonal matrix (b=c=0b = c = 0):

A=(a00d)A = \begin{pmatrix} a & 0 \\ 0 & d \end{pmatrix}

then the system decouples into two scalar equations.

This leads to the fundamental question that drives linear algebra:

Can we change our coordinate system (our basis) so that a coupled systemdxdt=Ax\frac{d\mathbf{x}}{dt} = A\mathbf{x}transforms into an uncoupled, diagonal system?


3. Seeking Special Directions: Eigenvalues and Eigenvectors

Let us search for special solutions that retain the simplicity of the one-dimensional exponential growth/decay.

Suppose there exists a non-zero constant vectorv∈R2∖{0}\mathbf{v} \in \mathbb{R}^2 \setminus \{\mathbf{0}\}such that the solution trajectory stays along the straight line spanned byv\mathbf{v}:

x(t)=eλtv\mathbf{x}(t) = e^{\lambda t} \mathbf{v}

for some scalarλ∈C\lambda \in \mathbb{C}.

Differentiatingx(t)\mathbf{x}(t)with respect to time:

dxdt=λeλtv\frac{d\mathbf{x}}{dt} = \lambda e^{\lambda t} \mathbf{v}

Substituting into the systemdxdt=Ax\frac{d\mathbf{x}}{dt} = A\mathbf{x}:

λeλtv=A(eλtv)=eλtAv\lambda e^{\lambda t} \mathbf{v} = A \left( e^{\lambda t} \mathbf{v} \right) = e^{\lambda t} A \mathbf{v}

Since the scalar factoreλte^{\lambda t}is never zero, we divide by it to obtain:

Av=λvA \mathbf{v} = \lambda \mathbf{v}

This is the celebrated eigenvalue equation:

3.1 The Characteristic Equation

RewritingAv=λvA\mathbf{v} = \lambda \mathbf{v}with the identity matrixII:

(A−λI)v=0(A - \lambda I) \mathbf{v} = \mathbf{0}

For a non-zero vectorv\mathbf{v}to exist in the null space of(A−λI)(A - \lambda I), the matrix(A−λI)(A - \lambda I)must be singular (non-invertible). Consequently, its determinant must vanish:

det⁡(A−λI)=0\det(A - \lambda I) = 0

For a2×22 \times 2matrixA=(abcd)A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}:

det⁡(a−λbcd−λ)=(a−λ)(d−λ)−bc=λ2−(a+d)λ+(ad−bc)=0\det \begin{pmatrix} a - \lambda & b \\ c & d - \lambda \end{pmatrix} = (a - \lambda)(d - \lambda) - bc = \lambda^2 - (a + d)\lambda + (ad - bc) = 0

Introducing the tracetr⁡(A)=a+d\operatorname{tr}(A) = a + dand the determinantdet⁡(A)=ad−bc\det(A) = ad - bc, the characteristic polynomial is:

p(λ)=λ2−tr⁡(A)λ+det⁡(A)=0p(\lambda) = \lambda^2 - \operatorname{tr}(A)\lambda + \det(A) = 0

4. A Concrete Example: Decoupling a Coupled System

Consider the coupled system:

dx1dt=4x1−2x2dx2dt=x1+x2\begin{aligned} \frac{dx_1}{dt} &= 4 x_1 - 2 x_2 \\ \frac{dx_2}{dt} &= x_1 + x_2 \end{aligned}

The coefficient matrix is:

A=(4−211)A = \begin{pmatrix} 4 & -2 \\ 1 & 1 \end{pmatrix}

Step 1: Find the Eigenvalues

Compute the characteristic equation:

det⁡(A−λI)=det⁡(4−λ−211−λ)=(4−λ)(1−λ)−(−2)(1)=λ2−5λ+6=0\det(A - \lambda I) = \det \begin{pmatrix} 4 - \lambda & -2 \\ 1 & 1 - \lambda \end{pmatrix} = (4 - \lambda)(1 - \lambda) - (-2)(1) = \lambda^2 - 5\lambda + 6 = 0

Factoring gives:

(λ−2)(λ−3)=0  ⟹  λ1=2,λ2=3(\lambda - 2)(\lambda - 3) = 0 \implies \lambda_1 = 2, \quad \lambda_2 = 3

Step 2: Find the Eigenvectors

Forλ1=2\lambda_1 = 2, solve(A−2I)v1=0(A - 2I)\mathbf{v}_1 = \mathbf{0}:

(2−21−1)(v1v2)=(00)  ⟹  v1−v2=0  ⟹  v1=(11)\begin{pmatrix} 2 & -2 \\ 1 & -1 \end{pmatrix} \begin{pmatrix} v_{1} \\ v_{2} \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix} \implies v_1 - v_2 = 0 \implies \mathbf{v}_1 = \begin{pmatrix} 1 \\ 1 \end{pmatrix}

Forλ2=3\lambda_2 = 3, solve(A−3I)v2=0(A - 3I)\mathbf{v}_2 = \mathbf{0}:

(1−21−2)(v1v2)=(00)  ⟹  v1−2v2=0  ⟹  v2=(21)\begin{pmatrix} 1 & -2 \\ 1 & -2 \end{pmatrix} \begin{pmatrix} v_{1} \\ v_{2} \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix} \implies v_1 - 2v_2 = 0 \implies \mathbf{v}_2 = \begin{pmatrix} 2 \\ 1 \end{pmatrix}

Step 3: Construct the General Solution

Each eigenvalue-eigenvector pair yields a fundamental solution:

x(1)(t)=e2t(11),x(2)(t)=e3t(21)\mathbf{x}_{(1)}(t) = e^{2t} \begin{pmatrix} 1 \\ 1 \end{pmatrix}, \quad \mathbf{x}_{(2)}(t) = e^{3t} \begin{pmatrix} 2 \\ 1 \end{pmatrix}

Because the differential operatorddt−A\frac{d}{dt} - Ais linear, any linear combination of solutions is also a solution (principle of superposition):

x(t)=c1e2t(11)+c2e3t(21)\mathbf{x}(t) = c_1 e^{2t} \begin{pmatrix} 1 \\ 1 \end{pmatrix} + c_2 e^{3t} \begin{pmatrix} 2 \\ 1 \end{pmatrix}

The constantsc1,c2c_1, c_2are uniquely determined by the initial conditionx(0)=c1v1+c2v2\mathbf{x}(0) = c_1 \mathbf{v}_1 + c_2 \mathbf{v}_2.


5. Change of Coordinates: The Geometry of Diagonalization

Why did finding eigenvectors solve the coupled system? Because the eigenvectorsv1\mathbf{v}_1andv2\mathbf{v}_2define a new coordinate system in which the action ofAAis purely diagonal.

5.1 The Change of Basis Matrix

Construct a matrixPPwhose columns are the eigenvectorsv1\mathbf{v}_1andv2\mathbf{v}_2:

P=(v1v2)=(1211)P = \begin{pmatrix} \mathbf{v}_1 & \mathbf{v}_2 \end{pmatrix} = \begin{pmatrix} 1 & 2 \\ 1 & 1 \end{pmatrix}

Becausev1\mathbf{v}_1andv2\mathbf{v}_2are linearly independent,det⁡(P)=1(1)−2(1)=−1≠0\det(P) = 1(1) - 2(1) = -1 \neq 0, soPPis invertible:

P−1=1−1(1−2−11)=(−121−1)P^{-1} = \frac{1}{-1} \begin{pmatrix} 1 & -2 \\ -1 & 1 \end{pmatrix} = \begin{pmatrix} -1 & 2 \\ 1 & -1 \end{pmatrix}

Any state vectorx\mathbf{x}can be expressed in terms of the eigenvector basis asx=Py\mathbf{x} = P \mathbf{y}, wherey=(y1y2)\mathbf{y} = \begin{pmatrix} y_1 \\ y_2 \end{pmatrix}represents the coordinates in the new basis:

x(t)=Py(t)  ⟺  y(t)=P−1x(t)\mathbf{x}(t) = P \mathbf{y}(t) \quad \iff \quad \mathbf{y}(t) = P^{-1}\mathbf{x}(t)

5.2 Decoupling via Similarity Transformation

Substitutex=Py\mathbf{x} = P\mathbf{y}into the differential equationdxdt=Ax\frac{d\mathbf{x}}{dt} = A\mathbf{x}:

Pdydt=A(Py)P \frac{d\mathbf{y}}{dt} = A (P \mathbf{y})

Multiplying both sides on the left byP−1P^{-1}:

dydt=(P−1AP)y\frac{d\mathbf{y}}{dt} = (P^{-1} A P) \mathbf{y}

Now examine the productAPAP:

AP=A(v1v2)=(Av1Av2)=(λ1v1λ2v2)A P = A \begin{pmatrix} \mathbf{v}_1 & \mathbf{v}_2 \end{pmatrix} = \begin{pmatrix} A\mathbf{v}_1 & A\mathbf{v}_2 \end{pmatrix} = \begin{pmatrix} \lambda_1 \mathbf{v}_1 & \lambda_2 \mathbf{v}_2 \end{pmatrix}

We can factor this into the matrix product:

(λ1v1λ2v2)=(v1v2)(λ100λ2)=PD\begin{pmatrix} \lambda_1 \mathbf{v}_1 & \lambda_2 \mathbf{v}_2 \end{pmatrix} = \begin{pmatrix} \mathbf{v}_1 & \mathbf{v}_2 \end{pmatrix} \begin{pmatrix} \lambda_1 & 0 \\ 0 & \lambda_2 \end{pmatrix} = P D

whereDDis the diagonal matrix of eigenvalues:

D=(λ100λ2)=(2003)D = \begin{pmatrix} \lambda_1 & 0 \\ 0 & \lambda_2 \end{pmatrix} = \begin{pmatrix} 2 & 0 \\ 0 & 3 \end{pmatrix}

MultiplyingAP=PDAP = PDon the left byP−1P^{-1}, we arrive at:

P−1AP=DP^{-1} A P = D

The transformed system fory(t)\mathbf{y}(t)is completely uncoupled:

(dy1dtdy2dt)=(2003)(y1y2)  ⟺  dy1dt=2y1  ⟹  y1(t)=y1(0)e2tdy2dt=3y2  ⟹  y2(t)=y2(0)e3t\begin{pmatrix} \frac{dy_1}{dt} \\ \frac{dy_2}{dt} \end{pmatrix} = \begin{pmatrix} 2 & 0 \\ 0 & 3 \end{pmatrix} \begin{pmatrix} y_1 \\ y_2 \end{pmatrix} \iff \begin{aligned} \frac{dy_1}{dt} &= 2y_1 \implies y_1(t) = y_1(0)e^{2t} \\ \frac{dy_2}{dt} &= 3y_2 \implies y_2(t) = y_2(0)e^{3t} \end{aligned}

Finally, transforming back to the original coordinates:

x(t)=Py(t)=P(y1(0)e2ty2(0)e3t)\mathbf{x}(t) = P \mathbf{y}(t) = P \begin{pmatrix} y_1(0)e^{2t} \\ y_2(0)e^{3t} \end{pmatrix}

The coupled dynamics have been uncoupled into independent scalar exponential modes.


6. General Theory: Diagonalizability

The procedure above generalizes from2×22 \times 2systems ton×nn \times nmatrices and operators.

6.1 Definition

A square matrixA∈Mn(F)A \in M_n(\mathbb{F})is called diagonalizable over a fieldF\mathbb{F}if there exists an invertible matrixP∈GLn(F)P \in GL_n(\mathbb{F})and a diagonal matrixD∈Mn(F)D \in M_n(\mathbb{F})such that:

P−1AP=Dor equivalentlyA=PDP−1P^{-1} A P = D \quad \text{or equivalently} \quad A = P D P^{-1}

The transformationA↦P−1APA \mapsto P^{-1}APis called a similarity transformation. Two matrices related in this way represent the same linear operator under different choices of basis.


6.2 The Fundamental Characterization Theorem

Theorem (Criterion for Diagonalizability)
Ann×nn \times nmatrixAAis diagonalizable if and only if there exists a basis forFn\mathbb{F}^nconsisting entirely of eigenvectors ofAA. That is,AApossessesnnlinearly independent eigenvectors.

Proof sketch:


6.3 Distinct Eigenvalues Guarantee Diagonalizability

Theorem (Linear Independence of Eigenvectors)
Eigenvectors corresponding to pairwise distinct eigenvalues are linearly independent.

Corollary: If ann×nn \times nmatrixAAhasnndistinct eigenvalues inF\mathbb{F}, thenAAis diagonalizable overF\mathbb{F}.


6.4 When Does Diagonalization Fail? Multiplicities and Defective Matrices

When an eigenvalue is repeated, diagonalizability is not guaranteed. We must distinguish between two notions of multiplicity:

  1. Algebraic Multiplicity (ma(λ)m_a(\lambda)): The multiplicity ofλ\lambdaas a root of the characteristic polynomialdet⁡(A−λI)=0\det(A - \lambda I) = 0.
  2. Geometric Multiplicity (mg(λ)m_g(\lambda)): The dimension of the eigenspace corresponding toλ\lambda:
    mg(λ)=dim⁡(ker⁡(A−λI))=n−rank⁡(A−λI)m_g(\lambda) = \dim(\ker(A - \lambda I)) = n - \operatorname{rank}(A - \lambda I)

For any eigenvalueλ\lambda, it is always true that:

1≤mg(λ)≤ma(λ)1 \le m_g(\lambda) \le m_a(\lambda)

Theorem (General Diagonalizability Condition)
A matrixA∈Mn(F)A \in M_n(\mathbb{F})is diagonalizable if and only if:

  1. The characteristic polynomial splits completely into linear factors overF\mathbb{F}.
  2. For every eigenvalueλ\lambda, its geometric multiplicity equals its algebraic multiplicity:
    mg(λ)=ma(λ)m_g(\lambda) = m_a(\lambda)

Matrices for whichmg(λ)<ma(λ)m_g(\lambda) < m_a(\lambda)for someλ\lambdaare called defective (or non-diagonalizable).


7. The Non-Diagonalizable Case: What Happens to the Differential Equation?

To understand what happens physically and mathematically when a matrix fails to be diagonalizable, consider the system:

dx1dt=2x1+x2dx2dt=2x2\begin{aligned} \frac{dx_1}{dt} &= 2x_1 + x_2 \\ \frac{dx_2}{dt} &= 2x_2 \end{aligned}

The coefficient matrix is a Jordan block:

A=(2102)A = \begin{pmatrix} 2 & 1 \\ 0 & 2 \end{pmatrix}

Analysis:

Solving the System:

Notice how the solution behaves:

  1. Fromdx2dt=2x2\frac{dx_2}{dt} = 2x_2, we obtain:
    x2(t)=c2e2tx_2(t) = c_2 e^{2t}
  2. Substituting this into the first equation:
    dx1dt−2x1=c2e2t\frac{dx_1}{dt} - 2x_1 = c_2 e^{2t}
  3. Using the integrating factore−2te^{-2t}:
    ddt(x1e−2t)=c2  ⟹  x1(t)e−2t=c1+c2t\frac{d}{dt}\left( x_1 e^{-2t} \right) = c_2 \implies x_1(t)e^{-2t} = c_1 + c_2 t
    x1(t)=c1e2t+c2te2tx_1(t) = c_1 e^{2t} + c_2 t e^{2t}

In vector form:

x(t)=c1e2t(10)+c2e2t[(01)+t(10)]\mathbf{x}(t) = c_1 e^{2t} \begin{pmatrix} 1 \\ 0 \end{pmatrix} + c_2 e^{2t} \left[ \begin{pmatrix} 0 \\ 1 \end{pmatrix} + t \begin{pmatrix} 1 \\ 0 \end{pmatrix} \right]

The termte2tt e^{2t}—a secular term—appears precisely because the matrix cannot be fully diagonalized. This motivates the next major structure in linear algebra: the Jordan Canonical Form and generalized eigenvectors.


8. Matrix Exponentials: The Unified Perspective

WhenAAis diagonalizable (A=PDP−1A = P D P^{-1}), computing functions of matrices becomes effortless. In particular, powers ofAAsimplify:

A2=(PDP−1)(PDP−1)=PD2P−1,…Ak=PDkP−1A^2 = (P D P^{-1})(P D P^{-1}) = P D^2 P^{-1}, \quad \dots \quad A^k = P D^k P^{-1}

For a diagonal matrixD=diag⁡(λ1,…,λn)D = \operatorname{diag}(\lambda_1, \dots, \lambda_n), computing powers is trivial:

Dk=(λ1k0⋱0λnk)D^k = \begin{pmatrix} \lambda_1^k & & 0 \\ & \ddots & \\ 0 & & \lambda_n^k \end{pmatrix}

The formal solution todxdt=Ax\frac{d\mathbf{x}}{dt} = A\mathbf{x}is defined via the matrix exponential:

x(t)=eAtx(0)\mathbf{x}(t) = e^{At} \mathbf{x}(0)

where the matrix exponential is defined by the convergent Taylor series:

eAt=∑k=0∞(At)kk!=I+At+A2t22!+A3t33!+⋯e^{At} = \sum_{k=0}^{\infty} \frac{(At)^k}{k!} = I + At + \frac{A^2 t^2}{2!} + \frac{A^3 t^3}{3!} + \cdots

UsingAk=PDkP−1A^k = P D^k P^{-1}:

eAt=∑k=0∞(PDP−1t)kk!=P(∑k=0∞(Dt)kk!)P−1=PeDtP−1e^{At} = \sum_{k=0}^{\infty} \frac{(P D P^{-1} t)^k}{k!} = P \left( \sum_{k=0}^{\infty} \frac{(Dt)^k}{k!} \right) P^{-1} = P e^{Dt} P^{-1}

BecauseDDis diagonal, its exponential is simply the exponential of its diagonal entries:

eDt=(eλ1t0⋱0eλnt)e^{Dt} = \begin{pmatrix} e^{\lambda_1 t} & & 0 \\ & \ddots & \\ 0 & & e^{\lambda_n t} \end{pmatrix}

Thus:

x(t)=P(eλ1t0⋱0eλnt)P−1x(0)\mathbf{x}(t) = P \begin{pmatrix} e^{\lambda_1 t} & & 0 \\ & \ddots & \\ 0 & & e^{\lambda_n t} \end{pmatrix} P^{-1} \mathbf{x}(0)

This encapsulates the essence of linear algebra: diagonalization finds the intrinsic coordinate frame where a complex coupled linear transformation acts simply as scalar multiplication along independent axes.