Ma · Mathematics

Which Matrix Transformations Are Linear?

Published By the 9to5Science editorial team

At a glance

  1. 1. Identify the rule

    Check whether the transformation is multiplication by one fixed matrix, or another rule defined on matrices.

  2. 2. Check the vector spaces

    Confirm that the input and output have compatible dimensions and use the same scalar field.

  3. 3. Test both properties

    A linear map preserves addition and scalar multiplication; test these directly if the rule is not clearly matrix multiplication.

  4. 4. Reject counterexamples

    A constant offset or nonlinear operation such as squaring an input coordinate usually makes a transformation nonlinear.

Advertisement

A matrix can define a linear transformation, but the word “matrix” alone does not guarantee that a rule is linear. The key question is whether the rule preserves vector addition and scalar multiplication. No list of specific options is included here, so the tests below let you classify each proposed transformation.

The definition of a linear transformation

A map T:V→WT:V\to W between vector spaces over the same field is linear if, for every u,v∈Vu,v\in V and scalar cc,

T(u+v)=T(u)+T(v),T(cv)=cT(v).T(u+v)=T(u)+T(v),\qquad T(cv)=cT(v).

These two conditions can also be combined into one: T(au+bv)=aT(u)+bT(v)T(au+bv)=aT(u)+bT(v) for all vectors u,vu,v and scalars a,ba,b.

If the rule is T(x)=AxT(x)=Ax for a fixed matrix AA, it is always linear, provided the matrix dimensions make the multiplication valid. For example, if AA is an m×nm\times n matrix, then TT maps vectors in Rn\mathbb{R}^n to vectors in Rm\mathbb{R}^m.

Indeed, matrix multiplication distributes over vector addition and respects scalar multiplication:

T(u+v)=A(u+v)=Au+Av=T(u)+T(v),T(u+v)=A(u+v)=Au+Av=T(u)+T(v), T(cu)=A(cu)=c(Au)=cT(u).T(cu)=A(cu)=c(Au)=cT(u).

The entries of AA may be any fixed real numbers (or elements of another chosen field). The matrix need not be square, invertible, or have any special pattern.

How to classify a proposed rule

For each option, first identify its input and output. Then ask whether it is multiplication by a fixed matrix. If it is not immediately in that form, test both defining properties:

  1. Choose arbitrary input vectors uu and vv and compare T(u+v)T(u+v) with T(u)+T(v)T(u)+T(v).
  2. Choose a scalar cc and compare T(cu)T(cu) with cT(u)cT(u).
  3. If either equality fails for even one example, the transformation is not linear.

To disprove linearity, you do not need to find a general formula for all inputs. One valid counterexample is enough. To prove linearity, however, verify the properties for arbitrary inputs, or rewrite the rule as multiplication by a fixed matrix.

A useful quick check is that every linear transformation sends the zero vector to the zero vector: T(0)=0T(0)=0. If a rule sends zero somewhere else, it cannot be linear. Passing this check does not prove linearity; it only rules out some non-linear maps.

Worked examples

A fixed matrix gives a linear transformation. Let

A=(12−13),T(x,y)=(x+2y,−x+3y).A=\begin{pmatrix}1&2\\-1&3\end{pmatrix},\qquad T(x,y)=(x+2y,-x+3y).

This is exactly multiplication by AA. For u=(1,0)u=(1,0) and v=(0,1)v=(0,1), for example, T(u)=(1,−1)T(u)=(1,-1) and T(v)=(2,3)T(v)=(2,3). Their sum is (3,2)(3,2), which also equals T(u+v)=T(1,1)T(u+v)=T(1,1). The general matrix calculation above proves the property for every pair of inputs and every scalar, so TT is linear.

Adding a fixed vector makes an affine map, not a linear one. Consider S(x)=Ax+bS(x)=Ax+b with a fixed nonzero vector bb. Then S(0)=b≠0S(0)=b\ne 0, so SS is not linear. For example, S(x,y)=(x+1,y)S(x,y)=(x+1,y) sends (0,0)(0,0) to (1,0)(1,0). If b=0b=0, the rule reduces to T(x)=AxT(x)=Ax and is linear.

Squaring a coordinate is nonlinear. Let R(x,y)=(x2,y)R(x,y)=(x^2,y). With u=(1,0)u=(1,0) and v=(1,0)v=(1,0),

R(u+v)=R(2,0)=(4,0),R(u)+R(v)=(1,0)+(1,0)=(2,0).R(u+v)=R(2,0)=(4,0),\qquad R(u)+R(v)=(1,0)+(1,0)=(2,0).

Since these differ, RR is not linear. It also fails scalar multiplication: R(2,0)=(4,0)R(2,0)=(4,0), whereas 2R(1,0)=(2,0)2R(1,0)=(2,0).

Rules involving matrices

Sometimes the inputs themselves are matrices rather than vectors. The same definition applies: the matrices of a fixed size form a vector space, with matrix addition and scalar multiplication. For instance, T(X)=XTT(X)=X^\mathsf{T} is linear because (X+Y)T=XT+YT(X+Y)^\mathsf{T}=X^\mathsf{T}+Y^\mathsf{T} and (cX)T=cXT(cX)^\mathsf{T}=cX^\mathsf{T}.

By contrast, T(X)=X2T(X)=X^2 is generally not linear, and T(X)=det⁡(X)T(X)=\det(X) is not linear for n×nn\times n matrices when n>1n>1. For the determinant, scalar multiplication gives det⁡(cX)=cndet⁡(X)\det(cX)=c^n\det(X), which is not generally cdet⁡(X)c\det(X). For a direct additivity counterexample when n>1n>1, let E11E_{11} have a 11 in its first diagonal entry and zeros elsewhere, and let D=diag⁡(0,1,…,1)D=\operatorname{diag}(0,1,\ldots,1). Then det⁡(E11)=det⁡(D)=0\det(E_{11})=\det(D)=0, but E11+D=IE_{11}+D=I and det⁡(I)=1\det(I)=1. For n=1n=1, the determinant is the identity map and is linear. Individual inputs or scalars may still make a test equality hold by coincidence, but linearity must hold for all inputs.

Common mistakes

  • Assuming every formula containing a matrix is linear. A matrix may appear inside a nonlinear operation, such as X2X^2 or det⁡(X)\det(X).
  • Treating a variable matrix as fixed. The rule X↦AXX\mapsto AX is linear when AA is fixed. A rule that multiplies two variable inputs, such as X↦X2X\mapsto X^2, is generally nonlinear.
  • Checking only the zero vector. Having T(0)=0T(0)=0 is necessary but not sufficient. For example, (x,y)↦(x2,y)(x,y)\mapsto(x^2,y) sends zero to zero but is nonlinear.
  • Confusing linear with affine. The rule x↦Ax+bx\mapsto Ax+b is affine. It is linear only when b=0b=0.

If you are given a particular list of matrix formulas, apply the addition and scalar-multiplication tests to each one; multiplication by a fixed matrix passes both tests automatically.

References

  1. Linear Algebra and Its Applications, David C. Lay, Steven R. Lay, and Judi J. McDonald
  2. Linear Algebra Done Right, Sheldon Axler

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.