Mathematical Methods for Economics · Linear Algebra
Vectors & Euclidean spaces
Almost everything in mathematical economics eventually gets written as a vector: a bundle of goods, a list of prices, a vector of coefficients to be estimated. This page builds the geometry of \(\mathbb{R}^n\) from the ground up — addition, the inner product, length, angle and orthogonality — and finishes with linear independence, span and basis, the ideas that underpin matrix rank and the solution of linear systems.
These are self-contained study notes from the linear algebra part of a mathematical economics course (module code EC3304). No prior linear algebra is assumed. Work through the definitions in order; each is followed by the intuition and, where useful, an economic reading.
Vectors and the space \(\mathbb{R}^n\)
An \(n\)-vector is an ordered list of \(n\) real numbers. For any \(n\)-tuple \(x_1,\ldots,x_n\) we write
$$\mathbf{x} := (x_1, x_2, \ldots, x_n) \in \mathbb{R}^n.$$
The set of all such vectors is Euclidean \(n\)-space, \(\mathbb{R}^n\). The number \(x_i\) is the \(i\)-th component or coordinate.
In economics the coordinates carry meaning: \(\mathbf{x}=(x_1,\ldots,x_n)\) might be a consumption bundle of \(n\) goods, and \(\mathbf{p}=(p_1,\ldots,p_n)\) the corresponding price vector. Two operations turn \(\mathbb{R}^n\) into a vector space.
For two \(n\)-vectors \(\mathbf{x},\mathbf{y}\), addition and subtraction are componentwise:
$$\mathbf{x} \pm \mathbf{y} := (x_1 \pm y_1,\; x_2 \pm y_2,\; \ldots,\; x_n \pm y_n).$$
For any \(n\)-vector \(\mathbf{x}\) and any scalar \(k \in \mathbb{R}\),
$$k\mathbf{x} := (kx_1,\; kx_2,\; \ldots,\; kx_n).$$
Adding two bundles gives the combined bundle; scaling a bundle by \(k\) stretches or shrinks it (and reverses direction if \(k<0\)). A linear combination of vectors \(\mathbf{a}_1,\ldots,\mathbf{a}_n\) is any expression \(c_1\mathbf{a}_1 + c_2\mathbf{a}_2 + \cdots + c_n\mathbf{a}_n\) with scalar weights \(c_i\) — a notion we return to under linear independence.
The inner product
The inner product (or dot product) collapses two vectors into a single number by multiplying matching coordinates and summing.
$$\mathbf{x} \cdot \mathbf{y} := x_1 y_1 + x_2 y_2 + \cdots + x_n y_n = \sum_{i=1}^{n} x_i y_i.$$
With \(\mathbf{x}=(2,3,1)\) and \(\mathbf{y}=(-4,2,1)\),
$$\mathbf{x}\cdot\mathbf{y} = 2\times(-4) + 3\times 2 + 1\times 1 = -8 + 6 + 1 = -1.$$
The inner product is symmetric (\(\mathbf{x}\cdot\mathbf{y}=\mathbf{y}\cdot\mathbf{x}\)), linear in each argument, and satisfies \(\mathbf{x}\cdot\mathbf{x}\ge 0\). It is the single most reused object in the subject: matrix multiplication is built entirely from inner products of rows and columns, and the expenditure \(\mathbf{p}\cdot\mathbf{x}=\sum_i p_i x_i\) — the cost of buying bundle \(\mathbf{x}\) at prices \(\mathbf{p}\) — is just an inner product.
Vector norm and distance
The inner product of a vector with itself measures its squared length. Taking the square root gives the norm, the Euclidean length of the vector.
For any \(n\)-vector \(\mathbf{x}\),
$$\lVert \mathbf{x} \rVert := \sqrt{\mathbf{x}\cdot\mathbf{x}} = \left(x_1^2 + x_2^2 + \cdots + x_n^2\right)^{1/2}.$$
The distance between two points is the norm of their difference, \(\lVert \mathbf{x}-\mathbf{y}\rVert\). Two inequalities are used constantly.
$$\lVert \mathbf{x} \pm \mathbf{y} \rVert \le \lVert \mathbf{x} \rVert + \lVert \mathbf{y} \rVert.$$
Cauchy–Schwarz inequality
$$\lvert \mathbf{x}\cdot\mathbf{y} \rvert \le \lVert \mathbf{x} \rVert\, \lVert \mathbf{y} \rVert.$$
The triangle inequality says the direct route is never longer than a detour. Cauchy–Schwarz bounds the inner product by the product of the lengths, and — crucially — it guarantees that the ratio \(\dfrac{\mathbf{x}\cdot\mathbf{y}}{\lVert\mathbf{x}\rVert\lVert\mathbf{y}\rVert}\) lies in \([-1,1]\), so it can be read as a cosine. That is exactly how we define angle in \(\mathbb{R}^n\).
Angle and orthogonality
The angle \(\theta\) between two \(n\)-vectors \(\mathbf{x},\mathbf{y}\) satisfies
$$\cos(\theta) = \frac{\mathbf{x}\cdot\mathbf{y}}{\lVert \mathbf{x} \rVert\, \lVert \mathbf{y} \rVert}.$$
This turns the abstract \(\mathbb{R}^n\) into a genuine geometry: we can speak of vectors pointing in similar directions (\(\cos\theta\) near \(1\)), opposite directions (near \(-1\)), or at right angles (\(\cos\theta=0\)). The last case has its own name.
Two \(n\)-vectors \(\mathbf{x},\mathbf{y}\) are orthogonal, written \(\mathbf{x}\perp\mathbf{y}\), if
$$\mathbf{x}\cdot\mathbf{y}=0.$$
Orthogonality is the geometric heart of least-squares estimation: the fitted values and the residuals of a regression are orthogonal vectors. Because \(\mathbf{x}\cdot\mathbf{x}=\lVert\mathbf{x}\rVert^2\), a vector is orthogonal to itself only if it is the zero vector.
Suppose we want the single number \(b\) that best scales a data vector \(\mathbf{x}\in\mathbb{R}^n\) to match a target \(\mathbf{y}\in\mathbb{R}^n\) (with \(\mathbf{x}\neq\mathbf{0}\)). The loss is the sum of squared errors, which is exactly a squared norm:
$$L(b) = \sum_{i=1}^{n}(y_i - b x_i)^2 = \lVert \mathbf{y} - b\mathbf{x}\rVert^2 = \mathbf{y}\cdot\mathbf{y} - 2b\,(\mathbf{x}\cdot\mathbf{y}) + b^2\,(\mathbf{x}\cdot\mathbf{x}).$$
Differentiating with respect to \(b\) and setting the result to zero gives \(-2(\mathbf{x}\cdot\mathbf{y}) + 2b(\mathbf{x}\cdot\mathbf{x})=0\), so
$$b^\ast = \frac{\mathbf{x}\cdot\mathbf{y}}{\mathbf{x}\cdot\mathbf{x}} = \frac{\mathbf{x}\cdot\mathbf{y}}{\lVert\mathbf{x}\rVert^2}.$$
This is the ordinary-least-squares slope through the origin, written purely in inner-product language. At the optimum the residual \(\mathbf{y}-b^\ast\mathbf{x}\) is orthogonal to \(\mathbf{x}\) — the geometric statement of the first-order condition.
Hyperplanes and normal vectors
An inner-product equation \(\mathbf{p}\cdot(\mathbf{x}-\mathbf{a})=0\) describes all points \(\mathbf{x}\) whose displacement from a fixed point \(\mathbf{a}\) is orthogonal to a fixed direction \(\mathbf{p}\). That set is a flat \((n-1)\)-dimensional slice of \(\mathbb{R}^n\).
The hyperplane through \(\mathbf{a}\in\mathbb{R}^n\) orthogonal to a nonzero normal vector \(\mathbf{p}\in\mathbb{R}^n\) is
$$\{\mathbf{x}\in\mathbb{R}^n \mid \mathbf{p}\cdot(\mathbf{x}-\mathbf{a})=0\}.$$
In a pure-exchange economy a consumer with endowment \(\mathbf{w}\) faces prices \(\mathbf{p}\). Affordable bundles that exactly exhaust the value of the endowment satisfy
$$p_1 x_1 + p_2 x_2 + \cdots + p_n x_n = p_1 w_1 + p_2 w_2 + \cdots + p_n w_n,$$
which rearranges to \(\mathbf{p}\cdot(\mathbf{x}-\mathbf{w})=0\). The budget set boundary is therefore a hyperplane with the price vector \(\mathbf{p}\) as its normal — prices point "uphill" in expenditure, exactly perpendicular to the budget line.
Linear independence and dependence
Whether a collection of vectors carries genuinely distinct information — or whether some are redundant repackagings of the others — is decided by linear independence.
The vectors \(\mathbf{a}_1, \mathbf{a}_2, \ldots, \mathbf{a}_n\) in \(\mathbb{R}^m\) are linearly dependent if there exist scalars \(c_1, c_2, \ldots, c_n\), not all zero, such that
$$c_1\mathbf{a}_1 + c_2\mathbf{a}_2 + \cdots + c_n\mathbf{a}_n = \mathbf{0}.$$
Otherwise they are linearly independent: the only way to combine them to the zero vector is with all weights zero.
Equivalently, a set is dependent precisely when at least one vector can be written as a linear combination of the others — it adds nothing new. Independence is the requirement that no such redundancy exists. This idea drives the notion of matrix rank: the rank of a matrix is the maximum number of linearly independent columns (equivalently, rows) it contains, and it decides whether a linear system has a unique solution, no solution, or infinitely many.
Span, basis and dimension
These three ideas are standard textbook framing that sit directly on top of linear combinations and independence, and they make precise what "dimension" means.
- The span of a set of vectors is the collection of all their linear combinations — every point you can reach by adding scaled copies of them.
- A basis for a space is a linearly independent set that spans it: enough vectors to reach everywhere, but with no redundancy. The standard basis of \(\mathbb{R}^n\) is \(\mathbf{e}_1=(1,0,\ldots,0),\ldots,\mathbf{e}_n=(0,\ldots,0,1)\).
- The dimension of a space is the number of vectors in any basis for it. Euclidean \(n\)-space \(\mathbb{R}^n\) has dimension \(n\).
Any vector in \(\mathbb{R}^n\) has exactly one representation in a given basis, which is why bases are the natural coordinate systems of economics — for example, expressing a commodity bundle in units of each good.
Self-check questions
Try each before revealing the worked answer.
1. For \(\mathbf{x}=(1,2,2)\) and \(\mathbf{y}=(2,0,-1)\), compute \(\mathbf{x}\cdot\mathbf{y}\), \(\lVert\mathbf{x}\rVert\), and decide whether the vectors are orthogonal.
The inner product is \(\mathbf{x}\cdot\mathbf{y} = (1)(2)+(2)(0)+(2)(-1) = 2 + 0 - 2 = 0\).
The norm is \(\lVert\mathbf{x}\rVert = \sqrt{1^2+2^2+2^2} = \sqrt{9} = 3\).
Because \(\mathbf{x}\cdot\mathbf{y}=0\), the two vectors are orthogonal: \(\mathbf{x}\perp\mathbf{y}\). Their angle is \(90^\circ\), since \(\cos\theta = 0/(3\lVert\mathbf{y}\rVert)=0\).
2. Are \(\mathbf{a}_1=(1,2)\), \(\mathbf{a}_2=(2,4)\) and \(\mathbf{a}_3=(0,1)\) linearly independent in \(\mathbb{R}^2\)?
No. First note \(\mathbf{a}_2 = 2\mathbf{a}_1\), so \(2\mathbf{a}_1 - \mathbf{a}_2 + 0\cdot\mathbf{a}_3 = \mathbf{0}\) with weights not all zero — that alone makes the set linearly dependent.
There is also a structural reason: any three vectors in \(\mathbb{R}^2\) must be linearly dependent, because a basis of \(\mathbb{R}^2\) contains only two vectors. You can never have more independent vectors than the dimension of the space.
3. A consumer faces prices \(\mathbf{p}=(2,3)\). Write the budget line through the endowment \(\mathbf{w}=(4,2)\) as a hyperplane, and state its normal vector.
The endowment value is \(\mathbf{p}\cdot\mathbf{w} = 2\times 4 + 3\times 2 = 14\). The budget hyperplane is
$$\{\mathbf{x}\in\mathbb{R}^2 \mid \mathbf{p}\cdot(\mathbf{x}-\mathbf{w})=0\} = \{(x_1,x_2)\mid 2x_1 + 3x_2 = 14\}.$$
The normal vector is the price vector \(\mathbf{p}=(2,3)\): it is orthogonal to the budget line, so moving along the budget line leaves total expenditure unchanged.
Related notes
Studying this for a
university module?
I tutor economics, econometrics and mathematics at university and postgraduate level, from linear algebra and optimisation through to econometric theory. Free 30–45 minute initial consultation.