So far you have read Ax=b as a question: which x produce b? There is a second, more dynamic reading. The matrix A is a machine that takes in a vector x and outputs a new vector Ax. Thinking of matrices as functions on vectors is what lets linear algebra describe rotations, projections, computer graphics and much more.
Transformations
Definition
Transformation
A transformation (or function, or mapping) T from Rn to Rm, written T:Rn→Rm, is a rule that assigns to each vector x in Rn a vector T(x) in Rm.
Rn is the domain and Rm is the codomain.
T(x) is the image of x.
The set of all images T(x) is the range of T.
The range is a subset of the codomain, and it may be much smaller. The codomain just says where outputs live; the range says which outputs actually occur.
Matrix transformations
Every m×n matrix A defines a transformation T(x)=Ax, often written x↦Ax. Since x must have n entries for Ax to be defined and the result has m entries, the domain is Rn and the codomain is Rm. Notice the order: an m×n matrix maps RntoRm.
Because Ax is a linear combination of the columns of A, the range of x↦Ax is exactly the span of the columns of A. Asking "is b in the range of T?" is the same as asking "is Ax=b consistent?"
Worked example: Images and preimages
Let A=13−1−357 and T(x)=Ax, so T:R2→R3.
(a) Find T(u) for u=(2,−1).
T(u)=213−1−−357=51−9.
(b) Find an x whose image is b=(3,2,−5), and decide whether it is unique.
So x2=−21 and x1=3+3x2=23. There are no free variables, so x=(23,−21) is the only vector mapped to b.
Seeing a transformation
For a map R2→R2, a good way to see what it does is to watch the unit square with corners (0,0), (1,0), (1,1) and (0,1). Take A=[1011]. Then
A[x1x2]=[x1+x2x2].
Each point slides to the right by an amount equal to its height. The corners go to (0,0), (1,0), (2,1) and (1,1), and the square becomes a parallelogram. This is a shear.
The unit square and its image under the shear, a slanted parallelogram with corners (0,0), (1,0), (2,1), (1,1).Open in grapher →
Other simple matrices give other familiar motions. [1000] projects every point straight down onto the x1-axis. [3003] stretches everything away from the origin by a factor of 3. [100−1] reflects across the x1-axis.
Linearity
Matrix transformations have two properties that come straight from the algebra of Ax: A(u+v)=Au+Av and A(cu)=cAu. Those two properties turn out to be the essential ones.
Definition
Linear transformation
A transformation T is linear if, for all vectors u,v in its domain and all scalars c,
T(u+v)=T(u)+T(v), and
T(cu)=cT(u).
Every matrix transformation is linear. Two consequences follow immediately from the definition:
T(0)=0andT(cu+dv)=cT(u)+dT(v).
For the first, T(0)=T(0⋅0)=0⋅T(0)=0. Applying the second property repeatedly gives the superposition principle: T carries any linear combination of inputs to the same linear combination of outputs.
T(c1v1+⋯+cpvp)=c1T(v1)+⋯+cpT(vp).
Linear maps respect linear combinations
If you know what a linear transformation does to a few vectors, you know what it does to every linear combination of them. You don't need a formula for T at all.
Worked example: Using only linearity
T:R2→R2 is linear, T(u)=(2,1) and T(v)=(−1,3). Find T(3u−2v).
S(0,0)=(1,0)=0, so S is not linear. (Translations are not linear.)
R(0,0)=(0,0), so that quick test doesn't help. Try scaling: R(2,2)=(4,2), but 2R(1,1)=2(1,1)=(2,2). Not linear.
U(x)=[40−12]x is a matrix transformation, so it is linear.
Common mistake
T(0)=0 is necessary for linearity but not sufficient. The map R above passes that test and still fails. To show a map is linear, either verify both defining properties for arbitrary vectors or write it as x↦Ax. To show it is not linear, one specific counterexample is enough.
Tip
A formula for T(x) is linear exactly when each output entry is a sum of constant multiples of the input entries: no constant terms, no products of variables, no powers, absolute values or functions like sin.
Practice
Practice 1
Let A=[2103−14] and T(x)=Ax. Find T(u) for u=(1,−2,3).
Enter a point like (2, -3)
Practice 2
A is a 4×7 matrix and T(x)=Ax. Which describes T?
Practice 3
Which transformation R2→R2 is linear?
Practice 4
T is linear with T(u)=(1,4) and T(v)=(−2,1). Find T(2u+5v).
Enter a point like (2, -3)
Practice 5
Let A=[12−2−3] and T(x)=Ax. Find the vector x with T(x)=(4,5).
Enter a point like (2, -3)
Practice 6
Let A=102316 and T(x)=Ax. Is b=(1,1,3) in the range of T?
Practice 7
Find the image of the point (2,3) under the shear x↦[10−21]x.
Enter a point like (2, -3)
Practice 8
T:R2→R2 is linear with T(1,1)=(3,1) and T(1,−1)=(1,5). Find T(4,0).