The Central Idea
A vector space is defined by vector addition and scalar multiplication.
A function between vector spaces is called linear when it respects both operations.
If
\[ T:V\to W, \]then linearity means
\[ T(\mathbf{u}+\mathbf{v}) = T(\mathbf{u})+T(\mathbf{v}) \]and
\[ T(c\mathbf{v}) = cT(\mathbf{v}). \]Such maps preserve the algebraic structure of vector spaces.
Definition of a Linear Transformation
Let \(V\) and \(W\) be vector spaces over the same field \(F\).
A function
\[ T:V\to W \]is a linear transformation if for all
\[ \mathbf{u},\mathbf{v}\in V \]and all
\[ c\in F, \]it satisfies
\[ \boxed{ T(\mathbf{u}+\mathbf{v}) = T(\mathbf{u})+T(\mathbf{v}) } \]and
\[ \boxed{ T(c\mathbf{v}) = cT(\mathbf{v}) }. \]A Combined Linearity Law
The two linearity conditions can be combined.
For scalars \(a,b\) and vectors \(\mathbf{u},\mathbf{v}\),
\[ \boxed{ T(a\mathbf{u}+b\mathbf{v}) = aT(\mathbf{u})+bT(\mathbf{v}) }. \]More generally,
\[ T\left( a_1\mathbf{v}_1+\cdots+a_k\mathbf{v}_k \right) = a_1T(\mathbf{v}_1)+\cdots+a_kT(\mathbf{v}_k). \]Linear transformations preserve linear combinations.
Why Preserving Linear Combinations Matters
If a basis
\[ B=\{\mathbf{v}_1,\ldots,\mathbf{v}_n\} \]generates every vector in \(V\), then knowing
\[ T(\mathbf{v}_1),\ldots,T(\mathbf{v}_n) \]determines \(T\) on the entire space.
This is one of the most powerful consequences of linearity.
Linear Transformations Send Zero to Zero
Every linear transformation satisfies
\[ \boxed{ T(\mathbf{0})=\mathbf{0} }. \]To see why,
\[ T(\mathbf{0}) = T(0\mathbf{v}) = 0T(\mathbf{v}) = \mathbf{0}. \]Linear Transformations Preserve Additive Inverses
Since
\[ -\mathbf{v}=(-1)\mathbf{v}, \]linearity gives
\[ T(-\mathbf{v}) = T((-1)\mathbf{v}) = -T(\mathbf{v}). \]Therefore,
\[ \boxed{ T(-\mathbf{v}) = -T(\mathbf{v}) }. \]Example: Scaling Transformation
Define
\[ T:\mathbb{R}^2\to\mathbb{R}^2 \]by
\[ T(x,y)=(2x,2y). \]This doubles every vector.
Since
\[ T(\mathbf{u}+\mathbf{v}) = 2(\mathbf{u}+\mathbf{v}) = 2\mathbf{u}+2\mathbf{v}, \]and
\[ T(c\mathbf{v}) = 2c\mathbf{v} = cT(\mathbf{v}), \]\(T\) is linear.
Example: Projection onto the \(x\)-Axis
Define
\[ P:\mathbb{R}^2\to\mathbb{R}^2 \]by
\[ \boxed{ P(x,y)=(x,0) }. \]This projection removes the vertical component.
It preserves vector addition and scalar multiplication, so it is a linear transformation.
Example: Reflection Across the \(x\)-Axis
Define
\[ R(x,y)=(x,-y). \]This transformation reflects vectors across the \(x\)-axis.
It is linear because both coordinates depend linearly on \(x\) and \(y\), and the origin remains fixed.
Example: Rotation About the Origin
Rotation by angle \(\theta\) in \(\mathbb{R}^2\) is given by
\[ \boxed{ T(x,y) = (x\cos\theta-y\sin\theta,\; x\sin\theta+y\cos\theta) }. \]This transformation preserves linear combinations and is therefore linear.
The requirement that the rotation be about the origin is important.
Translations Are Not Linear
Consider
\[ T(x,y)=(x+1,y). \]Then
\[ T(0,0)=(1,0), \]which is not the zero vector.
Since every linear transformation must satisfy
\[ T(\mathbf{0})=\mathbf{0}, \]this translation is not linear.
The Zero Test Is a Fast First Check
If a proposed transformation satisfies
\[ T(\mathbf{0})\ne\mathbf{0}, \]then it cannot be linear.
This gives a quick way to reject many affine transformations.
Passing the zero test is necessary, but not sufficient; the full linearity conditions must still hold.
Example: A Nonlinear Transformation
Define
\[ T(x,y)=(x^2,y). \]Although
\[ T(0,0)=(0,0), \]scalar multiplication is not preserved.
For example,
\[ T(2x,2y) = (4x^2,2y), \]while
\[ 2T(x,y) = (2x^2,2y). \]Therefore \(T\) is not linear.
Linear Transformations Between Different Spaces
The domain and codomain need not be the same vector space.
For example,
\[ T:\mathbb{R}^3\to\mathbb{R}^2 \]may be defined by
\[ T(x,y,z)=(x+y,\;z). \]This map is linear because each output coordinate is a linear combination of the input coordinates.
Linear Functionals
A linear transformation from a vector space to its scalar field,
\[ T:V\to F, \]is called a linear functional.
For example,
\[ T(x,y,z)=2x-y+4z \]is a linear functional on \(\mathbb{R}^3\).
Differentiation Is Linear
Consider the differentiation operator
\[ D:P_n(\mathbb{R})\to P_{n-1}(\mathbb{R}) \]defined by
\[ D(p)=p'. \]Since
\[ (p+q)'=p'+q' \]and
\[ (cp)'=cp', \]differentiation is a linear transformation.
Integration Can Also Be Linear
A definite integration functional such as
\[ T(f) = \int_a^b f(x)\,dx \]is linear on an appropriate function space because
\[ \int_a^b \bigl(cf(x)+dg(x)\bigr)\,dx = c\int_a^b f(x)\,dx + d\int_a^b g(x)\,dx. \]This shows that linearity appears throughout analysis as well as algebra.
Matrices Define Linear Transformations
Let \(A\) be an \(m\times n\) matrix.
Then
\[ T:\mathbb{R}^n\to\mathbb{R}^m \]defined by
\[ \boxed{ T(\mathbf{x})=A\mathbf{x} } \]is a linear transformation.
Why Matrix Multiplication Is Linear
Matrix multiplication satisfies
\[ A(\mathbf{u}+\mathbf{v}) = A\mathbf{u}+A\mathbf{v} \]and
\[ A(c\mathbf{v}) = c(A\mathbf{v}). \]Therefore the map
\[ \mathbf{x}\mapsto A\mathbf{x} \]preserves both vector operations.
Example: Matrix Transformation
Let
\[ A= \begin{pmatrix} 2&1\\ 0&3 \end{pmatrix}. \]Then
\[ T(x,y) = A \begin{pmatrix} x\\ y \end{pmatrix} = \begin{pmatrix} 2x+y\\ 3y \end{pmatrix}. \]Thus
\[ \boxed{ T(x,y)=(2x+y,3y) }. \]A Linear Transformation Is Determined by a Basis
Let
\[ B= \{\mathbf{v}_1,\ldots,\mathbf{v}_n\} \]be a basis for \(V\).
Every vector has the form
\[ \mathbf{v} = a_1\mathbf{v}_1+\cdots+a_n\mathbf{v}_n. \]By linearity,
\[ T(\mathbf{v}) = a_1T(\mathbf{v}_1) + \cdots + a_nT(\mathbf{v}_n). \]Therefore knowing \(T\) on the basis determines \(T\) everywhere.
Matrix Columns Are Images of Basis Vectors
In standard coordinates, let
\[ T:\mathbb{R}^n\to\mathbb{R}^m. \]The matrix of \(T\) has columns
\[ \boxed{ T(\mathbf{e}_1), T(\mathbf{e}_2), \ldots, T(\mathbf{e}_n) }. \]Thus a matrix records what the transformation does to the standard basis vectors.
Example: Build a Matrix from Basis Images
Suppose
\[ T(1,0)=(2,1) \]and
\[ T(0,1)=(-1,3). \]Then the standard matrix is
\[ \boxed{ A= \begin{pmatrix} 2&-1\\ 1&3 \end{pmatrix} }. \]Therefore,
\[ T(\mathbf{x})=A\mathbf{x}. \]The Kernel
The kernel of a linear transformation
\[ T:V\to W \]is the set of vectors sent to the zero vector:
\[ \boxed{ \ker(T) = \{\mathbf{v}\in V:T(\mathbf{v})=\mathbf{0}\} }. \]The Kernel Is a Subspace
The kernel always contains
\[ \mathbf{0} \]because
\[ T(\mathbf{0})=\mathbf{0}. \]If
\[ \mathbf{u},\mathbf{v}\in\ker(T), \]then
\[ T(\mathbf{u}+\mathbf{v}) = T(\mathbf{u})+T(\mathbf{v}) = \mathbf{0}. \]Scalar multiples remain in the kernel as well.
Therefore \(\ker(T)\) is a subspace of \(V\).
Example: Kernel of a Projection
Let
\[ P(x,y)=(x,0). \]The kernel consists of vectors satisfying
\[ P(x,y)=(0,0). \]Therefore,
\[ x=0, \]while \(y\) is arbitrary.
Thus
\[ \boxed{ \ker(P) = \{(0,y):y\in\mathbb{R}\} }. \]The entire \(y\)-axis is collapsed to zero.
The Image
The image or range of \(T\) is
\[ \boxed{ \operatorname{im}(T) = \{T(\mathbf{v}):\mathbf{v}\in V\} }. \]It is the collection of all outputs the transformation can produce.
The Image Is a Subspace
If
\[ \mathbf{w}_1=T(\mathbf{u}) \]and
\[ \mathbf{w}_2=T(\mathbf{v}), \]then
\[ \mathbf{w}_1+\mathbf{w}_2 = T(\mathbf{u}+\mathbf{v}). \]Also,
\[ c\mathbf{w}_1 = T(c\mathbf{u}). \]Therefore
\[ \operatorname{im}(T) \]is a subspace of \(W\).
Example: Image of a Projection
Again let
\[ P(x,y)=(x,0). \]Every output has the form
\[ (x,0). \]Therefore,
\[ \boxed{ \operatorname{im}(P) = \{(x,0):x\in\mathbb{R}\} }. \]The image is the \(x\)-axis.
Kernel and Injectivity
A linear transformation is injective exactly when its kernel contains only the zero vector:
\[ \boxed{ T\text{ injective} \Longleftrightarrow \ker(T)=\{\mathbf{0}\} }. \]Why a Trivial Kernel Gives Injectivity
Suppose
\[ T(\mathbf{u})=T(\mathbf{v}). \]Then
\[ T(\mathbf{u}-\mathbf{v})=\mathbf{0}. \]So
\[ \mathbf{u}-\mathbf{v}\in\ker(T). \]If the kernel contains only \(\mathbf{0}\), then
\[ \mathbf{u}-\mathbf{v}=\mathbf{0}, \]hence
\[ \mathbf{u}=\mathbf{v}. \]Image and Surjectivity
A linear transformation
\[ T:V\to W \]is surjective exactly when
\[ \boxed{ \operatorname{im}(T)=W }. \]Every vector in the codomain must be hit by at least one vector in the domain.
Rank and Nullity
The dimension of the image is called the rank:
\[ \boxed{ \operatorname{rank}(T) = \dim(\operatorname{im}(T)) }. \]The dimension of the kernel is called the nullity:
\[ \boxed{ \operatorname{nullity}(T) = \dim(\ker(T)) }. \]Rank-Nullity Theorem
If \(V\) is finite-dimensional and
\[ T:V\to W \]is linear, then
\[ \boxed{ \dim(V) = \operatorname{rank}(T) + \operatorname{nullity}(T) }. \]The domain's dimension splits into directions that survive in the image and directions that collapse into the kernel.
Geometric Meaning of Rank and Nullity
Rank measures how many independent output directions remain after the transformation.
Nullity measures how many independent input directions are lost.
A projection from the plane onto a line has
\[ \operatorname{rank}=1 \]and
\[ \operatorname{nullity}=1. \]Their sum equals
\[ 2=\dim(\mathbb{R}^2). \]Composition of Linear Transformations
Suppose
\[ T:U\to V \]and
\[ S:V\to W \]are linear.
Then the composition
\[ S\circ T:U\to W \]is also linear.
Why Composition Preserves Linearity
For vectors \(\mathbf{u},\mathbf{v}\),
\[ (S\circ T)(\mathbf{u}+\mathbf{v}) = S(T(\mathbf{u}+\mathbf{v})). \]Since \(T\) is linear,
\[ = S(T(\mathbf{u})+T(\mathbf{v})). \]Since \(S\) is linear,
\[ = S(T(\mathbf{u})) + S(T(\mathbf{v})). \]Therefore composition preserves addition, and scalar multiplication follows similarly.
Composition Corresponds to Matrix Multiplication
If
\[ T(\mathbf{x})=A\mathbf{x} \]and
\[ S(\mathbf{y})=B\mathbf{y}, \]then
\[ (S\circ T)(\mathbf{x}) = B(A\mathbf{x}) = (BA)\mathbf{x}. \]Therefore the matrix of the composition is
\[ \boxed{BA}. \]The Identity Transformation
Every vector space has an identity transformation
\[ I_V:V\to V \]defined by
\[ \boxed{ I_V(\mathbf{v})=\mathbf{v} }. \]This map is linear and acts as the identity under composition.
Invertible Linear Transformations
A linear transformation
\[ T:V\to W \]is invertible if there exists a transformation
\[ T^{-1}:W\to V \]such that
\[ T^{-1}\circ T=I_V \]and
\[ T\circ T^{-1}=I_W. \]Invertibility and Bijectivity
A linear transformation is invertible exactly when it is bijective.
Therefore,
\[ \boxed{ T\text{ invertible} \Longleftrightarrow T\text{ injective and surjective} }. \]The Inverse of an Invertible Linear Map Is Linear
If \(T\) is an invertible linear transformation, then
\[ T^{-1} \]is also linear.
This means invertible linear transformations preserve vector-space structure in both directions.
Invertible Matrices and Linear Transformations
For a square matrix \(A\), the map
\[ T(\mathbf{x})=A\mathbf{x} \]is invertible exactly when \(A\) is invertible.
Then
\[ T^{-1}(\mathbf{x})=A^{-1}\mathbf{x}. \]Thus matrix inverses and transformation inverses are the same structural idea.
Invertibility in Equal Finite Dimensions
Suppose
\[ T:V\to W \]is linear and
\[ \dim(V)=\dim(W)<\infty. \]Then any one of the following implies the others:
- \(T\) is injective;
- \(T\) is surjective;
- \(T\) is bijective;
- \(T\) is invertible.
Basis Images Under an Invertible Transformation
If
\[ B=\{\mathbf{v}_1,\ldots,\mathbf{v}_n\} \]is a basis of \(V\) and \(T:V\to W\) is invertible, then
\[ \boxed{ \{T(\mathbf{v}_1),\ldots,T(\mathbf{v}_n)\} } \]is a basis of \(W\).
Invertible linear transformations preserve basis structure.
Matrix Representation Depends on Bases
A linear transformation itself is an abstract function.
Its matrix depends on the bases chosen for the domain and codomain.
If
\[ B \]is a basis of \(V\) and
\[ C \]is a basis of \(W\), then one may write
\[ [T]_C^B \]for the matrix representing \(T\) relative to those bases.
Same Transformation, Different Matrix
Changing coordinates may change the matrix entries without changing the underlying transformation.
This distinction is important:
\[ \boxed{ \text{transformation} \ne \text{one particular matrix representation} }. \]A matrix is a coordinate description of a linear map.
Linear Transformations Preserve Linear Relations
Suppose
\[ a_1\mathbf{v}_1+\cdots+a_k\mathbf{v}_k=\mathbf{0}. \]Applying \(T\) gives
\[ a_1T(\mathbf{v}_1) + \cdots + a_kT(\mathbf{v}_k) = \mathbf{0}. \]Therefore every linear relation among input vectors produces a linear relation among their images.
Injective Linear Maps Preserve Independence
If \(T\) is injective and
\[ \mathbf{v}_1,\ldots,\mathbf{v}_k \]are linearly independent, then
\[ T(\mathbf{v}_1),\ldots,T(\mathbf{v}_k) \]are also linearly independent.
Injectivity prevents distinct directions from collapsing together.
Noninjective Maps Can Destroy Independence
A projection can send different independent vectors into a dependent collection.
For example, under
\[ P(x,y)=(x,0), \]the independent vectors
\[ (1,0) \]and
\[ (0,1) \]map to
\[ (1,0) \]and
\[ (0,0). \]The resulting collection is dependent.
Surjective Maps Preserve Spanning of the Codomain
If
\[ \mathbf{v}_1,\ldots,\mathbf{v}_k \]span \(V\), then
\[ T(\mathbf{v}_1),\ldots,T(\mathbf{v}_k) \]span \(\operatorname{im}(T)\).
If \(T\) is surjective, that image is all of \(W\).
Common Error: Assuming Every Formula with Variables Is Linear
A transformation is not linear merely because it is written using algebraic symbols.
Terms such as
\[ x^2,\qquad xy,\qquad \sin x, \]or added constants usually break linearity.
The defining tests must be checked.
Common Error: Forgetting \(T(\mathbf{0})=\mathbf{0}\)
Any linear transformation must fix the zero vector.
Therefore
\[ T(\mathbf{x})=A\mathbf{x}+\mathbf{b} \]is not linear when
\[ \mathbf{b}\ne\mathbf{0}. \]Such maps are affine rather than linear.
Common Error: Confusing Image with Codomain
The codomain is the declared target space \(W\).
The image is the subset of \(W\) actually reached by the transformation.
These are equal only when the transformation is surjective.
Common Error: Confusing Kernel with Zero Vector
The kernel is a set of vectors.
It always contains
\[ \mathbf{0}, \]but it may contain many other vectors.
A trivial kernel means the zero vector is the only vector mapped to zero.
Common Error: Assuming Every Linear Transformation Is Invertible
Projections are linear but not invertible.
They collapse some directions and therefore have nontrivial kernels.
Invertibility requires both injectivity and surjectivity.
Common Error: Reversing Matrix Order in Composition
If
\[ T(\mathbf{x})=A\mathbf{x} \]is applied first and
\[ S(\mathbf{y})=B\mathbf{y} \]second, then
\[ (S\circ T)(\mathbf{x}) = BA\mathbf{x}. \]The matrix order follows the composition order from right to left.
A Reliable Linearity Test
- Identify the domain and codomain vector spaces.
- Check \(T(\mathbf{0})=\mathbf{0}\) as a quick necessary condition.
- Choose arbitrary vectors \(\mathbf{u},\mathbf{v}\).
- Verify \(T(\mathbf{u}+\mathbf{v})=T(\mathbf{u})+T(\mathbf{v})\).
- Choose arbitrary scalar \(c\).
- Verify \(T(c\mathbf{v})=cT(\mathbf{v})\).
- If both laws hold, the transformation is linear.
A Reliable Kernel-and-Image Procedure
- To find the kernel, solve \(T(\mathbf{v})=\mathbf{0}\).
- Describe all solutions as a subspace of the domain.
- To find the image, describe all possible outputs \(T(\mathbf{v})\).
- For matrix maps, use the span of the matrix columns.
- Use the kernel to test injectivity.
- Compare the image with the codomain to test surjectivity.
Example: Full Linear-Transformation Analysis
Define
\[ T:\mathbb{R}^3\to\mathbb{R}^2 \]by
\[ T(x,y,z)=(x+y,\;y+z). \]Linearity
Each output coordinate is a linear combination of the input coordinates, so \(T\) is linear.
Matrix
The standard matrix is
\[ A= \begin{pmatrix} 1&1&0\\ 0&1&1 \end{pmatrix}. \]Kernel
Solve
\[ x+y=0 \]and
\[ y+z=0. \]Let
\[ y=t. \]Then
\[ x=-t,\qquad z=-t. \]Therefore,
\[ \ker(T) = \{t(-1,1,-1):t\in\mathbb{R}\}. \]Hence
\[ \operatorname{nullity}(T)=1. \]Image
The two rows are independent constraints, and the columns span \(\mathbb{R}^2\).
Therefore,
\[ \operatorname{im}(T)=\mathbb{R}^2 \]and
\[ \operatorname{rank}(T)=2. \]Rank-nullity gives
\[ 3=2+1. \]Practice 1: Zero Test
Is
\[ T(x,y)=(x+2,y) \]linear?
Practice 2: Scaling Map
Is
\[ T(x,y)=(3x,3y) \]linear?
Practice 3: Matrix Form
Find the standard matrix of
\[ T(x,y)=(2x-y,\;x+4y). \]Practice 4: Kernel
Find the kernel of
\[ T(x,y)=(x,0). \]Practice 5: Image
Find the image of
\[ T(x,y)=(x,0). \]Practice 6: Injectivity
Is the projection
\[ T(x,y)=(x,0) \]injective?
Practice 7: Basis Images
Suppose
\[ T(1,0)=(1,2) \]and
\[ T(0,1)=(3,4). \]Find \(T(2,-1)\).
Practice 8: Composition
Let
\[ T(x,y)=(2x,y) \]and
\[ S(x,y)=(x,-y). \]Find
\[ (S\circ T)(x,y). \]Practice 9: Rank-Nullity
A linear transformation
\[ T:\mathbb{R}^5\to\mathbb{R}^3 \]has rank \(3\).
Find its nullity.
Practice 10: Identify the Error
A student says:
“A transformation is linear whenever it sends the zero vector to the zero vector.”
Explain the error.
Practice Answers
Practice 1
No.
Since
\[ T(0,0)=(2,0)\ne(0,0), \]the transformation fails a necessary condition for linearity.
Practice 2
Yes. Scaling by a fixed scalar preserves vector addition and scalar multiplication.
Practice 3
The images of the standard basis vectors are
\[ T(1,0)=(2,1) \]and
\[ T(0,1)=(-1,4). \]Therefore,
\[ \boxed{ A= \begin{pmatrix} 2&-1\\ 1&4 \end{pmatrix} }. \]Practice 4
Solve
\[ (x,0)=(0,0). \]Then \(x=0\), while \(y\) is arbitrary.
Therefore,
\[ \boxed{ \ker(T) = \{(0,y):y\in\mathbb{R}\} }. \]Practice 5
Every output has the form
\[ (x,0). \]Therefore,
\[ \boxed{ \operatorname{im}(T) = \{(x,0):x\in\mathbb{R}\} }. \]Practice 6
No. The kernel contains every vector of the form
\[ (0,y), \]so it is larger than
\[ \{(0,0)\}. \]Therefore the transformation is not injective.
Practice 7
Since
\[ (2,-1) = 2(1,0)-(0,1), \]linearity gives
\[ T(2,-1) = 2T(1,0)-T(0,1). \]Thus
\[ 2(1,2)-(3,4) = (-1,0). \]Therefore,
\[ \boxed{T(2,-1)=(-1,0)}. \]Practice 8
First apply \(T\):
\[ T(x,y)=(2x,y). \]Then apply \(S\):
\[ S(2x,y)=(2x,-y). \]Therefore,
\[ \boxed{ (S\circ T)(x,y)=(2x,-y) }. \]Practice 9
By rank-nullity,
\[ 5 = 3+\operatorname{nullity}(T). \]Therefore,
\[ \boxed{\operatorname{nullity}(T)=2}. \]Practice 10
Sending zero to zero is necessary but not sufficient.
A linear transformation must also preserve vector addition and scalar multiplication.
For example,
\[ T(x,y)=(x^2,y) \]sends \((0,0)\) to \((0,0)\) but is not linear.
What to Remember
A linear transformation
\[ T:V\to W \]preserves vector addition and scalar multiplication:
\[ \boxed{ T(\mathbf{u}+\mathbf{v}) = T(\mathbf{u})+T(\mathbf{v}) } \]and
\[ \boxed{ T(c\mathbf{v}) = cT(\mathbf{v}) }. \]Important structural consequences include:
- \(T(\mathbf{0})=\mathbf{0}\);
- linear combinations are preserved;
- the kernel is a subspace of the domain;
- the image is a subspace of the codomain;
- injectivity is equivalent to a trivial kernel;
- surjectivity means the image equals the codomain;
- composition of linear maps is linear;
- finite-dimensional linear maps can be represented by matrices;
- invertible linear maps preserve vector-space structure in both directions.
In finite-dimensional settings,
\[ \boxed{ \dim(V) = \operatorname{rank}(T) + \operatorname{nullity}(T) }. \]Linear transformations are therefore the natural structure-preserving maps of vector spaces.
Where We Go Next
Linear transformations are one example of a broader idea: maps that preserve algebraic structure. Groups, rings, fields, and vector spaces all have their own structure-preserving maps.
The next lesson, Homomorphisms, Isomorphisms, and Invariants, develops this general principle and shows how different algebraic systems can be recognized as structurally equivalent even when their elements look very different.