Skip to content

Affine Map

Definition

Let n, k∈N+n,\,k \in\mathbb{N}^+. A function f ⁣:Rn→Rk\boldsymbol{f}\colon \mathbb{R}^n\to \mathbb{R}^k is an affine map (or affine transformation) if there are a k×nk\times n real matrix A\boldsymbol{A} and a vector b∈Rk\boldsymbol{b}\in\mathbb{R}^k such that

f(x)=Ax+bfor all x∈Rn.\boldsymbol{f}(\boldsymbol{x})=\boldsymbol{A} \boldsymbol{x}+ \boldsymbol{b}\qquad\text{for all }\boldsymbol{x}\in\mathbb{R}^n.

A real-valued affine map f ⁣:Rn→Rf\colon \mathbb{R}^n\to \mathbb{R} (k=1k=1) is an affine function:

f(x1, x2, …, xn)=a1x1+a2x2+⋯+anxn+b.f(x_1,\,x_2,\,\dots,\,x_n) =a_1x_1+a_2x_2+\cdots+a_nx_n+b.

An affine map is a linear map exactly when b=0\boldsymbol{b}=\boldsymbol{0}, that is, when f(0)=0\boldsymbol{f}(\boldsymbol{0})=\boldsymbol{0}.

Terminology

The Math III lecture notes, like much of economics and calculus, call an affine function a linear function and reserve linear transformation for the case b=0\boldsymbol{b}=\boldsymbol{0}. In linear algebra linear always means b=0\boldsymbol{b}=\boldsymbol{0}, so this wiki says affine for the general case.

As a Function between Spaces, the map assigns one output vector to each input vector. The Vector Space operations make the expression Ax+b\boldsymbol{A}\boldsymbol{x}+\boldsymbol{b} meaningful: first apply the matrix, then add the translation vector.


Interpretation

An affine map is a linear map followed by a shift: if one argument is increased by cc units, the value changes by cc times a fixed vector, wherever the starting point is.

Two parallel lines: the linear map f(x) = 2x through the origin and the affine map g(x) = 2x + 1, which is shifted up and has g(0) = 1.

The blue linear map f(x)=2xf(x)=2x passes through the origin. The red affine map g(x)=f(x)+1g(x)=f(x)+1 is shifted upwards by 11, so g(0)=1g(0)=1 rather than 00. Both lines have slope 22: the matrix A\boldsymbol{A}, here the number 22, sets the slope, and b\boldsymbol{b} only moves the graph.

Both parts can be read off from f\boldsymbol{f}: b=f(0)\boldsymbol{b}=\boldsymbol{f}(\boldsymbol{0}), and f(x)−f(y)=A(x−y)\boldsymbol{f}(\boldsymbol{x})-\boldsymbol{f}(\boldsymbol{y})=\boldsymbol{A}(\boldsymbol{x}-\boldsymbol{y}), so a change in the output depends only on the change in the input. Affine maps keep affine combinations: f(λx+(1−λ)y)=λf(x)+(1−λ)f(y)\boldsymbol{f}(\lambda\boldsymbol{x}+(1-\lambda)\boldsymbol{y})=\lambda\boldsymbol{f}(\boldsymbol{x})+(1-\lambda)\boldsymbol{f}(\boldsymbol{y}) for every real λ\lambda. Hence they map lines to lines or points, and midpoints to midpoints. The image of Rn\mathbb{R}^n is the range of x↦Ax\boldsymbol{x}\mapsto\boldsymbol{A}\boldsymbol{x}, shifted by b\boldsymbol{b}.

A common slip comes from the terminology in the note. g(x)=2x+1g(x)=2x+1 is called a linear function in calculus, but it is not a linear map: g(1+1)=5g(1+1)=5, while g(1)+g(1)=6g(1)+g(1)=6.

This idea returns later: a differentiable function of several variables is one that is approximated near a point by an affine map, just as a differentiable function of one variable is approximated by its tangent line.


Key Results

  • The graph {(x,f(x)) ⁣:x∈Rn}\{(\boldsymbol{x},f(\boldsymbol{x}))\colon\boldsymbol{x}\in\mathbb{R}^n\} of an affine function on Rn\mathbb{R}^n is an affine hyperplane of Rn+1\mathbb{R}^{n+1}; it passes through the origin exactly when b=0.b=0\text{.}
  • The level sets {x ⁣:f(x)=c}\{\boldsymbol{x}\colon f(\boldsymbol{x})=c\} of a non-constant affine function are parallel affine hyperplanes of Rn\mathbb{R}^n.
  • A composition of affine maps is affine.

Examples

  • f(x,y)=x+2y−1f(x,y) = x + 2y - 1 is affine but not linear, since f(0,0)=−1f(0,0)=-1; x+2yx+2y is both.
  • g(x,y)=x+xyg(x,y) = x + xy and h(x,y)=2x+sin⁡yh(x,y) = 2^x + \sin y are not affine.

Prerequisites

Sources

Aliases: affine transformation Keywords: affine function, linear function (economics usage) Symbols: element of, lambda, natural numbers, real numbers

Last updated: 22 October 2026 19:04