A fundamental motivation for studying systems of linear equations arises in modeling interdependent economic sectors, known as the Leontief Input-Output closed model. In a simplified national economy divided into five primary sectors—agriculture, construction, energy, manufacturing, and services—each industry requires commodities produced by other industries to sustain operations. This interdependence is quantified by the percentage of production consumed by each sector.
Specifically, the consumption dependencies are structured such that:
Agriculture consumes 10% of agriculture, 20% of construction, 20% of energy, 10% of manufacturing, and 10% of services.
Construction consumes 20% of agriculture, 20% of construction, 30% of energy, 20% of manufacturing, and 20% of services.
Energy consumes 20% of agriculture, 20% of construction, 10% of energy, 10% of manufacturing, and 10% of services.
Manufacturing consumes 30% of agriculture, 20% of construction, 20% of energy, 20% of manufacturing, and 30% of services.
Services consume 20% of agriculture, 20% of construction, 20% of energy, 40% of manufacturing, and 30% of services.
Assuming the economy is in equilibrium such that total output equates to total internal demand, the equilibrium output prices p1,p2,p3,p4,p5 for each respective industry must satisfy the linear system:
Formally, a linear equation in n variables x1,…,xn is an expression of the form a1x1+a2x2+⋯+anxn=b, where a1,…,an,b∈R. A system of linear equations consists of a finite collection of m such equations across n unknowns:
A solution to such a system is a tuple (x1,…,xn) satisfying every equation simultaneously. The system is classified as consistent if it possesses at least one solution, and inconsistent if no solution exists. While real coefficients are the standard focus, the entire theory generalizes without modification to systems over the complex field C.
The consistency and solution count of linear systems exhibit three distinct behaviors:
The system x1+x2=2 and x1−x2=0 is consistent with a unique solution (x1,x2)=(1,1).
The system x1+x2=2 and 2x1+2x2=4 is consistent with infinitely many solutions, parameterized by (x,2−x) for any x∈R, because the second equation is a direct multiple of the first.
The system x1+x2=2 and 3x1+3x2=7 is inconsistent, as the first equation implies 3x1+3x2=6, which directly contradicts 3x1+3x2=7.
The system x1+x2=2, x1−x2=0, and 3x1+2x2=4 is inconsistent, since the unique solution to the first two equations, (1,1), yields 3(1)+2(1)=5=4.
Gaussian Elimination and Matrix Systems
A system of m linear equations is in upper triangular form if, for every 2≤i≤m, the i-th equation does not contain the unknowns x1,…,xi−1. Such systems are solved directly by back-substitution starting from the bottom equation. For instance, the system x1+x3=5, x2+2x3=4, and 3x3=3 yields x3=1 directly from the third equation, followed by x2=4−2(1)=2 from the second, and x1=5−(1)=4 from the first, delivering the unique solution tuple (4,2,1).
To represent and manipulate systems systematically, an m×n matrix A with real coefficients is defined as a rectangular array of real numbers comprising m rows and n columns, denoted A∈Mm,n(R) (or Mn(R) if m=n). The (i,j)-entry is denoted aij. The coefficient matrix and augmented matrix associated with an m×n linear system are given by:
The solution set of a linear system is invariant under the following elementary row operations:
Row-switching: Ri↔Rj.
Row-multiplying: Ri→aRi with scalar a=0.
Row-addition: Ri→Ri+aRj for j=i and scalar a∈R.
The Gaussian elimination algorithm systematically reduces any augmented matrix to an upper triangular or row echelon form:
Placing the pivot: Identify the leftmost non-zero column j. Select a row containing a non-zero entry in this column, interchange it to the top active row position, and label this non-zero entry the pivot and its row Rp.
Killing off coefficients below the pivot: For each row Ri located below the pivot row, replace Ri with a linear combination aRi+bRp (with a=0) chosen such that the entry in column j becomes zero.
Induction step: Freeze the current pivot row and repeat steps 1 and 2 on the submatrix formed by the remaining lower rows. Terminate when only one row remains or all columns in the remaining submatrix are zero.
An augmented matrix is in row echelon form if the first non-zero entry in any row (the pivot) appears strictly to the right of the pivots of all preceding rows. All entirely zero rows reside at the bottom. For example, the following matrices are in row echelon form:
Back-substitution reveals x3=1, x2=2−3(1)=−1, and x1=1−2(−1)−1=2, yielding the unique solution (2,−1,1).
Solution Structure and Homogeneous Systems
A system of linear equations possesses either zero, exactly one, or infinitely many solutions. A system is consistent if and only if the row echelon form of its augmented matrix contains no contradiction row of the form (0…0∣α) where α=0. A consistent system has a unique solution if every column of the coefficient matrix contains a pivot, and infinitely many solutions if at least one column lacks a pivot.
Variables corresponding to columns containing a pivot are pivot variables; all other variables are free variables. To construct the general solution of a consistent system:
Transform the augmented matrix to row echelon form via Gaussian elimination.
Assign arbitrary real parameters α,β,γ,⋯∈R to each free variable.
Solve for the pivot variables in terms of the free variables via back-substitution from bottom to top.
For example, consider an augmented matrix already in row echelon form:
10005000330024003800
Here, x1 and x3 are pivot variables, while x2 and x4 are free variables. Setting x4=α and x2=β, back-substitution yields 3x3+4α=8⟹x3=31(8−4α), and x1+5β+3(31(8−4α))+2α=3⟹x1=−5+2α−5β. The general solution tuple is {(−5+2α−5β,β,31(8−4α),α)∣α,β∈R}. Specific choices produce explicit solutions, such as (−7,0,4,−1) for (α,β)=(−1,0), and (−6,1,0,2) for (α,β)=(2,1).
A system of linear equations (E) is homogeneous if b1=⋯=bm=0; otherwise it is inhomogeneous. The homogeneous system associated with (E) is denoted (E0). Every homogeneous system is consistent because it always admits the trivial solution x1=⋯=xn=0. Any homogeneous system with more unknowns than equations (m<n) must have infinitely many solutions. This follows because Gaussian elimination on an m×(n+1) augmented matrix yields at most k≤m<n pivot rows, guaranteeing at least n−k>0 free variables. For instance, the system x+y+z=0 and x+2y+3z=0 contains two equations in three variables, immediately guaranteeing infinitely many solutions.
Vectors in Real Euclidean Space
A vector in R2 represents an arrow characterized by magnitude and direction, independent of any fixed initial point in the plane. Identifying vectors with points by placing their tails at the origin 0=(0,0)T, any vector v∈R2 is uniquely specified by its horizontal displacement v1 and vertical displacement v2, written as a 2×1 column matrix v=(v1v2)=(v1,v2)T.
In general, the Euclidean space Rn is the set of all n×1 column matrices with real entries:
Rn=⎩⎨⎧x1⋮xnxi∈R,i=1,…,n⎭⎬⎫
Vector addition and scalar multiplication in Rn operate entrywise:
A linear combination of vectors v1,…,vk∈Rn is any vector of the form λ1v1+⋯+λkvk for scalars λ1,…,λk∈R. For example, (13)=3(12)−(23), showing that (13) is a linear combination of (12) and (23).
The standard basis vectors of Rn are defined by e1=(1,0,…,0)T, e2=(0,1,…,0)T, …, en=(0,…,0,1)T. Every vector x=(x1,…,xn)T decomposes uniquely into the standard basis as x=x1e1+⋯+xnen.
Given an m×n matrix A=[col1(A)∣⋯∣coln(A)] and a vector x∈Rn, matrix-vector multiplication is defined as the linear combination of the columns of A weighted by the components of x:
Ax:=x1col1(A)+⋯+xncoln(A)∈Rm
The i-th component of Ax is (Ax)i=∑k=1naikxk. Consequently, the linear system Ax=b has a solution if and only if the vector b can be expressed as a linear combination of the columns of A. The induced map TA:Rn→Rm defined by TA(x)=Ax satisfies additivity A(x1+x2)=Ax1+Ax2 and homogeneity A(λx)=λAx.
Vector Spans, Linear Independence, and Bases in Euclidean Space
The span of a family of vectors v1,…,vk∈Rn is the set of all their possible linear combinations:
span(v1,…,vk)={∑i=1kλiviλi∈R for all i}
Determining whether a target vector belongs to a span reduces to testing the consistency of a linear system. To check if (3,−4,2)T∈span((1,0,2)T,(1,1,3)T), one solves λ(1,0,2)T+κ(1,1,3)T=(3,−4,2)T:
Back-substitution reveals κ=−4 and λ=3−κ=7, so the vector is in the span with 7(1,0,2)T−4(1,1,3)T=(3,−4,2)T.
The span V=span(u1,…,uk) contains the zero vector 0, is closed under vector addition (x+y∈V), and is closed under scalar multiplication (λx∈V). Any non-empty subset of Rn satisfying these three closure properties is a vector subspace of Rn. In R2, the span of two vectors can only be the trivial subspace {0}, a line passing through the origin (if they are collinear), or the entirety of R2 (if they are non-collinear).
A family of vectors v1,…,vk spans Rn if span(v1,…,vk)=Rn. Any spanning family of Rn must contain at least n vectors (k≥n). If k<n, reducing the associated n×k matrix would produce at least one row without a pivot, allowing one to construct an inconsistent system with an unreachable target vector b.
A family of vectors v1,…,vk∈Rn is linearly dependent if there exist scalars λ1,…,λk, not all zero, such that λ1v1+⋯+λkvk=0. Equivalently, at least one vector in the family is a linear combination of the others. A family is linearly independent if:
λ1v1+⋯+λkvk=0⟹λ1=⋯=λk=0
Linear independence guarantees that every vector in the span is uniquely expressed as a linear combination of the family. To test independence, solve c1v1+⋯+ckvk=0 via Gaussian elimination. If all variables are pivot variables, the family is linearly independent. If free variables occur, non-trivial solutions exist and the family is linearly dependent.
Testing the vectors (2,1,1)T,(1,2,1)T,(1,1,2)T in R3 yields:
All three variables are pivot variables, confirming linear independence. In contrast, evaluating (1,2,3,−1)T, (2,1,3,1)T, and (4,5,9,−1)T in R4 produces a row echelon form with only two pivots and one free variable c3=α, giving c2=−α and c1=−2α. Choosing α=1 yields the explicit dependence relation −2(1,2,3,−1)T−(2,1,3,1)T+(4,5,9,−1)T=0.
Any linearly independent family in Rn contains at most n vectors (k≤n), because a homogeneous system with k>n variables and n equations necessarily has free variables. A basis of Rn is a family of vectors that is both linearly independent and spans Rn. Every basis of Rn contains exactly n vectors. For any family of exactly n vectors in Rn, being a basis, spanning Rn, and being linearly independent are equivalent conditions.
Volume and Determinants
Geometrically, n vectors u1,…,un∈Rn form a basis if and only if the n-dimensional parallelepiped they span possesses non-zero volume. The algebraic volume function voln:(Rn)n→R is uniquely characterized by three axiomatic properties:
(V1) Multilinear (n-linear): The function is linear in each argument when all other n−1 vectors are held fixed.
(V2) Degenerate on dependent sets: If x1,…,xn is linearly dependent, then voln(x1,…,xn)=0.
(V3) Normalized on standard basis:voln(e1,…,en)=1.
Under n-linearity, condition (V2) is equivalent to being alternating: exchanging any two distinct vectors changes the sign of the volume:
voln(…,xi,…,xj,…)=−voln(…,xj,…,xi,…)
Applying these axioms in dimension 2 for x=ae1+be2 and y=ce1+de2 gives:
where ε(σ)∈{−1,1} is the signature of the permutation σ. The determinant of an n×n matrix A=[c1∣⋯∣cn] is defined as det(A):=voln(c1,…,cn). A set of n vectors forms a basis of Rn if and only if det(A)=0.
The Uniqueness Principle establishes that any n-linear alternating map ψ:(Rn)n→R is proportional to the volume function, satisfying ψ=ψ(e1,…,en)voln. Consequently, the determinant acts as a volume stretching factor: for any n×n matrix A and vectors x1,…,xn∈Rn,
voln(Ax1,…,Axn)=det(A)×voln(x1,…,xn)
Setting xi=Bei immediately proves the multiplicativity of the determinant: det(AB)=det(A)det(B).
Determinants can be calculated via Laplace expansion using the (i,j)-minor Mij, defined as the determinant of the (n−1)×(n−1) submatrix obtained by removing row i and column j from A:
Expansion along column j: det(A)=∑i=1n(−1)i+jaijMij.
Expansion along row i: det(A)=∑j=1n(−1)i+jaijMij.
For an upper-triangular or lower-triangular matrix, the determinant simplifies to the product of its diagonal entries: det(A)=d1d2…dn. Elementary row operations affect the determinant as follows: swapping two rows multiplies the determinant by −1, and replacing Ri with αRi+βRj scales the determinant by α.
Evaluating a 4×4 determinant by expanding along the first column illustrates the method:
A real vector space is a set V equipped with vector addition +:V×V→V and scalar multiplication ⋅:R×V→V satisfying seven foundational axioms for all u,v,w∈V and a,b∈R:
Null vector: There exists 0∈V such that v+0=v.
Opposite vector: There exists −v∈V such that v+(−v)=0.
Commutativity of addition:v+w=w+v.
Associativity of addition:(v+w)+u=v+(w+u).
Distributivity:a(v+w)=av+aw and (a+b)v=av+bv.
Associativity of scalar multiplication:a(bv)=(ab)v.
Compatibility with scalar unit:1⋅v=v.
Standard real vector spaces include:
Real Euclidean spaces Rn.
Function spaces F(R) of all functions f:R→R, as well as the subspaces of continuous functions C(R) and smooth functions C∞(R), with addition (f+g)(x)=f(x)+g(x) and multiplication (λf)(x)=λf(x).
Polynomial spaces P(R) of all polynomials, and Pn(R) of polynomials of degree at most n.
Sequence spaces RN of real sequences (un)n≥0, viewed as infinite vectors (u0,u1,…)T, operated on pointwise.
Complex vector spaces are defined identically by taking the scalar field to be C. More broadly, vector spaces can be defined over arbitrary mathematical fields, such as finite fields Z/pZ for a prime p, which form the foundation of algebraic error-correcting codes.
A family of vectors v1,…,vk∈V is linearly independent if ∑civi=0⟹c1=⋯=ck=0. For instance, the functions f1(x)=cos(x), f2(x)=cos(2x), and f3(x)=cos(3x) in F(R) are linearly independent. Setting acos(x)+bcos(2x)+ccos(3x)=0 for all x and evaluating at specific test points reveals:
At x=π/2: a(0)+b(−1)+c(0)=0⟹b=0.
At x=π/6: a(23)+c(0)=0⟹a=0.
At x=0: c(1)=0⟹c=0.
Basis, Dimension, and Coordinatisation
A basis of an abstract vector space V is a linearly independent family of vectors that spans V. The standard polynomial basis for Pn(R) is {1,x,x2,…,xn}. This family spans Pn(R) by definition. It is linearly independent because if a0+a1x+⋯+anxn=0 identically, evaluating at x=0 gives a0=0. Differentiating the zero function produces the zero function; evaluating successive derivatives at x=0 sequentially proves a1=a2=⋯=an=0.
Any two bases for a given vector space contain the identical number of vectors. If a basis contains n vectors, any family containing m>n vectors must be linearly dependent: expressing each of the m vectors as a linear combination of the n basis vectors and setting up a linear combination equal to 0 leads to a homogeneous system with m unknowns and n equations, which always has non-trivial solutions.
The dimension of V, denoted dim(V), is the number of vectors in any basis. A space is finite-dimensional if it has a finite basis, and infinite-dimensional otherwise. Known dimensions include dim(Rn)=n, dim(Pn(R))=n+1, and dim(P(R))=∞ (since it contains arbitrarily large linearly independent sets {1,x,…,xn}).
Choosing an ordered basis B=(e1,…,en) for an n-dimensional vector space V allows any vector x=∑i=1nxiei to be uniquely identified with its coordinate matrix [x]B=(x1,…,xn)T∈Rn. For example, with the basis B=(1,x,x2) of P2(R), the polynomials P(x)=2x2−3x+5 and Q(x)=3x+7 have coordinate representations:
[P]B=5−32,[Q]B=730
The coordinatisation map T:V→Rn defined by T(x)=[x]B is an isomorphism (a bijective linear map). Consequently, a family of vectors v1,…,vk in V is linearly independent, spanning, or a basis of V if and only if the coordinate vectors [v1]B,…,[vk]B satisfy the identical property in Rn. As an application, any family of polynomials P0,P1,…,Pn∈Pn(R) where deg(Pi)=i for each i forms a basis of Pn(R), because the coordinate matrix with columns [Pi]B is upper-triangular with non-zero diagonal entries, guaranteeing a non-zero determinant. For example, {1,1+x,2+x2,3−x3} forms a basis of P3(R).
Vector Subspaces and Solution Spaces
A subset W of a vector space V is a vector subspace if:
0∈W.
For all w1,w2∈W, w1+w2∈W.
For all λ∈R and w∈W, λw∈W.
Any subspace W is itself a vector space under the inherited operations. In R2, the only subspaces are the trivial set {0}, straight lines passing through the origin, and R2 itself. Sets not passing through the origin, such as {(x,y)T∣x+y=1}, are not subspaces because they fail to contain 0 and are not closed under addition.
The solution set W={x∈Rn∣Ax=0} of a homogeneous system of linear equations in n unknowns is a vector subspace of Rn. Its dimension equals the number of free variables in the row echelon form of A. To find a basis for the solution space, reduce A to row echelon form, parameterize the free variables, and decompose the general solution into a linear combination of constant vectors.
A basis of the solution space is given by the two vectors {31(−1,5,3,0)T,31(−2,1,0,3)T}.
The solution set of a linear differential equation also forms a vector subspace. For the simple harmonic oscillator equation y′′+ω2y=0, the sum of any two solutions y1,y2 satisfies (y1+y2)′′+ω2(y1+y2)=(y1′′+ω2y1)+(y2′′+ω2y2)=0, and any scalar multiple satisfies (λy1)′′+ω2(λy1)=λ(y1′′+ω2y1)=0. Hence the solution space is a subspace of F(R), given explicitly by span(cos(ωx),sin(ωx)).
For any finite-dimensional space V and subspace W⊆V, dim(W)≤dim(V), with dim(W)=dim(V) if and only if W=V. The rank of a family of vectors v1,…,vk is the dimension of the subspace they span. To determine the rank and extract a basis for span(v1,…,vk), form the matrix with columns vi and reduce it to row echelon form. The rank is the number of pivots; the original vectors corresponding to the pivot columns form a basis of the span.
Applying this to the vectors (1,2,3,0)T,(2,1,2,1)T,(1,5,7,−1)T,(0,0,1,2)T in R4:
Pivots reside in columns 1, 2, and 4. Thus the family has rank 3, and a basis for the subspace is {(1,2,3,0)T,(2,1,2,1)T,(0,0,1,2)T}.
Linear Maps and Matrix Representations
A map T:U→V between vector spaces is a linear map if for all u1,u2∈U and λ∈R:
T(u1+u2)=T(u1)+T(u2).
T(λu)=λT(u).
Linear maps preserve linear combinations, T(∑ciui)=∑ciT(ui), and preserve the zero vector, T(0)=0. A linear map is completely determined by its values on a basis. For example, if T:R2→R3 satisfies T((1,1)T)=(4,3,5)T and T((0,1)T)=(1,2,0)T, then because (5,3)T=5(1,1)T−2(0,1)T, linearity requires:
Every linear map T:Rn→Rm corresponds to a unique m×n matrix A=[T] such that T(v)=Av, where the columns of A are the images of the standard basis vectors: A=[T(e1)∣⋯∣T(en)]. The space of linear maps L(Rn,Rm) is isomorphic to the matrix space Mm,n(R). For example, a counterclockwise planar rotation by angle θ is linear, with canonical matrix:
Aθ=(cos(θ)sin(θ)−sin(θ)cos(θ))
Linear maps on function spaces include the differentiation operator D:C∞(R)→C∞(R) given by D(f)=f′, and the integration operator I:C(R)→R given by I(f)=∫01f(s)ds.
Sum, scalar multiplication, and composition of linear maps correspond directly to matrix addition, scalar multiplication, and matrix multiplication:
[T+S]=[T]+[S].
[λT]=λ[T].
[S∘T]=[S][T], where (AB)ij=∑k=1maikbkj.
Matrix multiplication is associative, (AB)C=A(BC), and distributive, but strictly non-commutative in general (AB=BA).
For a linear operator T:V→V on an n-dimensional vector space with basis B=(e1,…,en), the matrix of T relative to B is defined by [T]B=[[T(e1)]B∣⋯∣[T(en)]B], which satisfies [T(v)]B=[T]B[v]B. Consider the shift operator T:P2(R)→P2(R) defined by T(P)(x)=P(x+1) under the basis B=(1,x,x2). Evaluating the basis elements gives:
T(1)=1⟹[T(1)]B=(1,0,0)T.
T(x)=x+1⟹[T(x)]B=(1,1,0)T.
T(x2)=(x+1)2=x2+2x+1⟹[T(x2)]B=(1,2,1)T.
Hence:
[T]B=100110121
To compute T(x2−x), multiply by the coordinate vector [x2−x]B=(0,−1,1)T:
A square matrix A∈Mn(R) is invertible if there exists a matrix A−1 such that AA−1=A−1A=In. Invertibility is equivalent to TA being a bijection, to the row echelon form having n pivots, and to det(A)=0. When A is invertible, the unique solution to Ax=y is x=A−1y, and det(A−1)=det(A)1.
To compute A−1, row reduce the augmented matrix [A∣In] to the form [In∣A−1]. For the matrix:
Given two bases B=(e1,…,en) and B′=(e1′,…,en′) of V, the change of basis matrix from B′ to B is P=[B′]B=[[e1′]B∣⋯∣[en′]B]. Coordinates transform according to [v]B′=P−1[v]B, and linear operator matrices transform by similarity:
[T]B′=P−1[T]BP
Consider the reflection across the line at angle π/4 in R2. In the standard basis, its matrix is [s]B=(0110). Transforming to the rotated basis B′=(21(1,1)T,21(−1,1)T) using the change of basis matrix P=21(11−11) produces:
The determinant of an operator, det(T)=det([T]B), is independent of the chosen basis because det(P−1[T]BP)=det(P)−1det([T]B)det(P)=det([T]B).
The Rank-Nullity Theorem and Interpolation
For a matrix A∈Mm,n(R), the image Im(A) is the subspace of Rm spanned by its columns; its dimension is the rank rk(A). The kernel ker(A) is the subspace of Rn consisting of all solutions to Ax=0; its dimension is the nullity. The Rank-Nullity Theorem for matrices establishes that:
rk(A)+dim(ker(A))=n
This follows because Gaussian elimination divides the n columns into rk(A) pivot variables and n−rk(A) free variables, which parameterize the kernel.
For an abstract linear map T:U→V between vector spaces, the kernel is ker(T)={u∈U∣T(u)=0} (a subspace of U), and the image is Im(T)={T(u)∣u∈U} (a subspace of V). The general Rank-Nullity Theorem states:
dim(Im(T))+dim(ker(T))=dim(U)
If dim(U)=dim(V), then T is an isomorphism if and only if ker(T)={0}. This provides an elegant proof of polynomial interpolation. Given pairwise distinct points x0,x1,…,xn∈R and arbitrary values y0,y1,…,yn∈R, consider the linear evaluation map:
T:Pn(R)→Rn+1,T(P)=P(x0)⋮P(xn)
Both spaces have dimension n+1. If P∈ker(T), then P(x0)=⋯=P(xn)=0. A non-zero real polynomial of degree at most n can have at most n roots. Since P has n+1 distinct roots, P must be the zero polynomial. Hence ker(T)={0}, proving that T is an isomorphism, which guarantees the existence and uniqueness of an interpolating polynomial.
Inner Product Spaces and Distance Minimization
Overdetermined linear systems often fail to have exact solutions. Approximating statistical data with a linear trend P(x)=a+bx across N data points (xi,yi) requires finding a vector in the 2-dimensional subspace W=span((1,…,1)T,(x1,…,xN)T) of RN that is closest to the observation vector v=(y1,…,yN)T.
The Euclidean inner product of u,v∈Rn is defined by ⟨u,v⟩=uTv=∑i=1nuivi. It induces the Euclidean norm ∥v∥=⟨v,v⟩ and the distance metric d(u,v)=∥u−v∥. The transpose satisfies (AB)T=BTAT. Two vectors are orthogonal (u⊥v) if ⟨u,v⟩=0. Pythagoras' theorem holds: ∥u+v∥2=∥u∥2+∥v∥2⟺⟨u,v⟩=0.
An abstract inner product on a real vector space V is a map ⟨⋅,⋅⟩:V×V→R satisfying for all u,v,w∈V and λ∈R:
Symmetry: ⟨u,v⟩=⟨v,u⟩.
Positive definiteness: ⟨v,v⟩≥0, with ⟨v,v⟩=0⟺v=0.
Linearity: ⟨u+v,w⟩=⟨u,w⟩+⟨v,w⟩ and ⟨λu,v⟩=λ⟨u,v⟩.
The space of continuous functions C([0,1]) becomes an inner product space under:
⟨f,g⟩=∫01f(x)g(x)dx
Positive definiteness holds because if f is not the zero function, continuity ensures f(x)2>ε2>0 across some non-empty interval [a,b]⊂[0,1], yielding ∫01f(x)2dx≥(b−a)ε2>0.
For a vector v∈V and a finite-dimensional subspace W⊂V, the orthogonal projection πW(v) is the unique vector p∈W such that v−p is orthogonal to W, meaning ⟨v−p,w⟩=0 for all w∈W. This projection is the unique minimizer of the distance to v over W. For any other w′∈W, Pythagoras' theorem dictates:
When W is spanned by a basis e1,…,ek, writing p=∑i=1kλiei leads to the normal equations in terms of the matrix A=[e1∣⋯∣ek]:
ATAλ=ATv
Because A has full column rank, ATA is invertible, guaranteeing a unique solution for λ.
Least Squares Data Fitting and Polynomial Regression
For an inconsistent linear system Ax=v, a least squares solution is a vector x∈Rm that minimizes the residual norm ∥Ax−v∥, which occurs precisely when Ax=πIm(A)(v). A vector x is a least squares solution if and only if it satisfies the normal equations:
ATAx=ATv
To find the optimal quadratic polynomial P(x)=a+bx+cx2 approximating data values P(0)=0, P(1)=1, P(2)=4, and P(3)=7, set up the matrix system Ac=v:
A=111101230149,c=abc,v=0147
Computing the normal system components gives:
ATA=461461436143698,ATv=123080
Solving via Gaussian elimination yields:
abc=−0.10.90.5
The best-fitting quadratic polynomial is P(x)=0.5x2+0.9x−0.1.
Orthogonal Bases, Gram-Schmidt, and Audio Compression
A family of vectors is orthogonal if each pair of distinct vectors is orthogonal. If every vector has norm 1, the family is orthonormal. Any orthogonal family of non-zero vectors is linearly independent: taking the inner product of ∑ciui=0 with uk yields ck⟨uk,uk⟩=0, forcing ck=0.
Decomposing a vector v along an orthogonal basis (e1,…,en) requires no matrix inversion. The coefficients are computed directly via projections:
v=∑k=1n⟨ek,ek⟩⟨v,ek⟩ek
If the basis is orthonormal, the expansion simplifies to v=∑k=1n⟨v,ek⟩ek. Similarly, the orthogonal projection onto a subspace W with orthogonal basis (e1,…,ek) is the sum of projections onto the individual basis lines:
πW(v)=∑i=1k⟨ei,ei⟩⟨v,ei⟩ei
The Gram-Schmidt algorithm converts any basis (u1,…,un) into an orthogonal basis (e1,…,en):
Set e1=u1.
For each successive index i, subtract the projections onto the preceding orthogonal vectors:
ei=ui−∑j=1i−1⟨ej,ej⟩⟨ui,ej⟩ej
Any vector ei may be scaled by a non-zero scalar to eliminate fractions before proceeding. Normalizing each resulting vector produces an orthonormal basis.
Applying Gram-Schmidt to the vectors u1=(1,1,1,1)T, u2=(0,1,0,1)T, and u3=(−1,1,3,2)T in R4 proceeds as follows:
e1=(1,1,1,1)T.
e2=(0,1,0,1)T−42(1,1,1,1)T=21(−1,1,−1,1)T.
Projecting u3 onto e1 and e2 gives e3=21(−4,−1,4,1)T.
Normalizing the orthogonal vectors produces the orthonormal basis:
⎩⎨⎧211111,21−11−11,341−4−141⎭⎬⎫
In audio signal processing, musical sounds represent air pressure variations encoded as functions f:R→R. Pitch corresponds to frequency ω, amplitude represents volume, and the waveform profile dictates acoustic timbre. Periodic waveforms of period 1/ω reside in C1/ω(R), equipped with the inner product:
⟨u,v⟩=∫01/ωu(x)v(x)dx
The trigonometric family {cos(2πωkx),sin(2πωkx)}k=1n forms an orthogonal set. Projecting the waveform f onto the subspace Wn=span({cos(2πωkx),sin(2πωkx)}k=1n) produces the truncated Fourier series Snf(x). By Fourier's theorem, as n→∞, Snf converges to f. Audio compression algorithms store only the leading Fourier coefficients ak,bk, discarding high frequencies beyond human auditory range (20Hz to 20,000Hz) and harmonics with negligible energy.
Eigenvalues, Eigenvectors, and Matrix Powers
In population ecology, modeling population dynamics requires analyzing transitions between life stages. In an age-structured model dividing an animal population into adults an and juveniles jn, adults produce an average of γ juveniles annually and survive with probability α, while juveniles survive and mature into adults with probability β:
(an+1jn+1)=(αγβ0)(anjn)⟹xn=Anx0
Evaluating the long-term behavior of such dynamical systems requires computing high matrix powers An, which becomes straightforward when A can be diagonalized as A=PDP−1, giving An=PDnP−1.
For a linear map T:V→V, a scalar λ∈R is an eigenvalue of T if there exists a non-zero vector x∈V such that T(x)=λx; the vector x is an eigenvector for λ. For an n×n matrix A, eigenvalues are the roots of the characteristic polynomial:
χA(λ):=det(A−λIn)=0
A matrix A∈Mn(R) has at most n eigenvalues. Eigenvectors corresponding to pairwise distinct eigenvalues are linearly independent. The eigenspace for an eigenvalue λ is the subspace Eλ(A)=ker(A−λIn).
A matrix A∈Mn(R) is diagonalisable over R if there exists an invertible matrix P and a diagonal matrix D such that P−1AP=D. This occurs if and only if:
All complex roots of χA(λ) are real.
For every eigenvalue λ, the geometric multiplicity (defined as dim(Eλ(A))) equals the algebraic multiplicity (the multiplicity of λ as a root of χA).
If A has n distinct real eigenvalues, it is automatically diagonalisable.
The trace of a square matrix tr(A)=∑i=1naii and the determinant are invariant under similarity transformations: tr(PAP−1)=tr(A) and det(PAP−1)=det(A). For any diagonalisable matrix with eigenvalues λ1,…,λn counted with multiplicity:
tr(A)=∑i=1nλi,det(A)=∏i=1nλi
Consider diagonalising the symmetric matrix:
A=324202423
The characteristic polynomial is χA(λ)=−λ3+6λ2+15λ+8=−(λ+1)2(λ−8). The eigenvalues are λ=8 (algebraic multiplicity 1) and λ=−1 (algebraic multiplicity 2). The trace check confirms 8+(−1)+(−1)=6=3+0+3, and the determinant check confirms 8(−1)(−1)=8=det(A).
Solving (A−8I3)x=0 via Gaussian elimination yields the eigenspace E8(A)=span((1,1/2,1)T), giving geometric multiplicity 1. Solving (A+I3)x=0 yields the single independent equation 2x+y+2z=0, which has two free variables and produces the basis E−1(A)=span((−1,0,1)T,(−1/2,1,0)T), giving geometric multiplicity 2. Because geometric and algebraic multiplicities coincide, A is diagonalisable with modal matrix P and diagonal matrix D:
P=11/21−101−1/210,D=8000−1000−1
To compute matrix powers Ak=PDkP−1, consider A=(2123). Its characteristic polynomial is χA(λ)=λ2−5λ+4=(λ−1)(λ−4). Eigenspaces are E1(A)=span((2,−1)T) and E4(A)=span((1,1)T). The transformation matrices are:
Applications to Dynamical Systems and Recurrence Relations
For a dynamical system xk+1=Axk, decomposing the initial condition along an eigenvector basis x0=∑i=1nαiei delivers the explicit trajectory:
xk=Akx0=∑i=1nαiλikei
In the Leslie population model with adult survival α=1/2 and juvenile maturation β=3/10, the transition matrix has characteristic polynomial χA(x)=x2−21x−103γ. Its eigenvalues are:
λ1,2=205±25+120γ
The long-term population trajectory depends on the dominant eigenvalue relative to 1:
If γ<5/3, both eigenvalues satisfy ∣λi∣<1, causing xk→0 (population extinction).
If γ>5/3, the dominant eigenvalue satisfies λ2>1, causing xk→∞ (population explosion).
If γ=5/3, then λ2=1 and λ1=−1/4. The population converges to the stable eigenvector for λ2=1, which is e2=(3/5,1)T. The equilibrium ratio of adults to juveniles is a=53j.
For the Fibonacci sequence an+1=an+an−1 with a0=0 and a1=1, define xn=(an+1,an)T. The recurrence is encoded as xn+1=Axn with A=(1110). The characteristic polynomial χA(x)=x2−x−1 has roots given by the golden ratio ϕ=21+5 and its conjugate ϕ′=21−5. The eigenvectors are eϕ=(ϕ,1)T and eϕ′=(ϕ′,1)T. Expanding x0=(1,0)T=51eϕ−51eϕ′ and computing Anx0 yields Binet's formula:
an=5ϕn−(ϕ′)n
This method generalizes to any m-th order linear recurrence an+m=∑i=0m−1cian+i by using the companion matrix. If the characteristic polynomial has complex roots, diagonalisation over C yields oscillatory real solutions. For un+2=−un+1−un, the characteristic roots are λ1,2=e±2iπ/3. For initial conditions u0=2 and u1=1, the solution is un=e2inπ/3+e−2inπ/3=2cos(2nπ/3).
Markov Chains, Stochastic Matrices, and the Perron-Frobenius Theorem
A finite Markov chain models a memoryless stochastic process across n discrete states s1,…,sn. The transition probability from state sj to state si depends solely on the current state. A Markov diagram is a directed graph where each edge from vertex vj to vi carries weight aij∈(0,1] such that the outgoing weights from each vertex sum to 1: ∑i=1naij=1. The associated transition matrix A=(aij) is a stochastic matrix: all entries are non-negative (aij≥0) and every column sums to 1.
Given an initial probability or resource distribution x0, the expected distribution after k steps is xk=Akx0. A stationary distribution is an equilibrium vector satisfying Ax=x, representing an eigenvector for the eigenvalue λ=1.
A non-negative matrix A is positive if aij>0 for all i,j, and regular if there exists an integer k≥1 such that Ak is positive. In terms of the Markov diagram, regularity is equivalent to the existence of an integer k≥1 such that a directed path of length exactly k exists between every pair of vertices.
Every square matrix and its transpose share the identical characteristic polynomial and eigenvalues, because det(AT−λIn)=det((A−λIn)T)=det(A−λIn). For any stochastic matrix A, the vector of all ones 1=(1,…,1)T satisfies AT1=1, proving that λ=1 is always an eigenvalue of AT, and therefore also an eigenvalue of A.
The Perron-Frobenius Theorem for regular stochastic matrices establishes:
The value λ=1 is an eigenvalue of A, and there exists a stationary distribution whose components are all strictly positive.
The eigenspace for λ=1 has dimension 1 (dim(E1(A))=1).
Every other eigenvalue λ of A satisfies ∣λ∣<1.
For every initial vector x whose components do not sum to zero (∑xi=0), the sequence Akx converges to a stationary distribution of A.
When A is diagonalisable with eigenvalues 1=λ1>∣λ2∣≥⋯≥∣λn∣, the convergence error decays exponentially according to the second largest eigenvalue magnitude μ=max2≤i≤n∣λi∣:
∥Akx−x∞∥=O(μk)
If A is not diagonalisable, the error satisfies O(μk) for any μ strictly between the second eigenvalue magnitude and 1.
In the Edinburgh bicycle redistribution problem across four zones, the transition matrix is:
Because A has strictly positive entries, it is regular. Distributing 200 bicycles equally as x0=(50,50,50,50)T produces the successive daily distributions:
This converges rapidly to the unique stationary distribution x∞=(70,40,50,40)T.
The PageRank Algorithm
The World Wide Web can be modeled as a directed graph where pages are vertices and hyperlinks are directed edges. If page j contains dj total outgoing links, and nij links point to page i, a random web surfer clicks link i with probability aij=djnij. For a four-page network with link counts given by:
0211001122012120
The raw link transition matrix is:
A=01/21/41/4001/21/22/52/501/52/51/52/50
To prevent surfers from getting trapped in cycles or dead ends, the model incorporates random teleportation: with probability α (the damping factor, conventionally α=0.85), the surfer follows a hyperlink; with probability 1−α, the surfer jumps uniformly at random to any page in the network. The uniform jump matrix is U=(1/n)i,j. The resulting Google matrix is:
G=αA+(1−α)U
Because G is strictly positive, it is regular, and the Perron-Frobenius Theorem guarantees a unique positive stationary distribution r satisfying Gr=r with ∑ri=1. For the four-page network with α=0.85:
Solving Gr=r under the constraint ∑ri=1 yields the ranking vector:
r≈0.210.260.280.24
The resulting page ranking from most popular to least popular is Page 3 (0.28), followed by Page 2 (0.26), Page 4 (0.24), and Page 1 (0.21).
The rate of convergence is governed by the damping factor α. Using the 1-norm ∥x∥1=∑∣xi∣, for any stochastic matrix A, ∥Ax∥1≤∥x∥1. For any probability vectors x and y, the uniform components cancel:
Gx−Gy=αA(x−y)⟹∥Gx−Gy∥1≤α∥x−y∥1
By induction, the convergence of the power method to the stationary vector r satisfies:
∥Gkx−r∥1≤2αk
This convergence rate depends entirely on α=0.85 and is independent of the total number of web pages n. Achieving an approximation error below 10−6 requires at most 90 power iterations, making the algorithm computationally feasible on global scales.