Tutorials › Linear Algebra › Verifying Linearity for Formula-Defined Maps

Proof Strategies in Linear Algebra · Tutorial 990 of 1000

Verifying Linearity for Formula-Defined Maps

Use the two defining tests to verify formula-defined maps on vectors, polynomials, and matrices, and identify when a formula fails to be linear.

Intermediate 10 min read

What You'll Learn

  • State the domain, codomain, and scalar field when testing a formula-defined map.
  • Check additivity using arbitrary inputs rather than selected examples.
  • Check scalar homogeneity for every real scalar.
  • Verify linearity for a coordinate formula on vectors.
  • Verify linearity of polynomial differentiation and a matrix formula.
  • Use a concrete violation to show that an affine map is not linear.

What Must Be Checked

A formula can look simple and still fail to define a linear map. For example, adding a constant to an otherwise linear coordinate formula changes how the map treats the zero vector. The reliable test is direct: take arbitrary inputs, compute the map of their sum, and compare it with the sum of their images; then compare the image of a scalar multiple with the same scalar times the image.

Throughout this tutorial the scalar field is \(\mathbb{R}\). The domain and codomain will be familiar real vector spaces such as \(\mathbb{R}^n\), spaces of polynomials, and spaces of matrices. In each case, the formula must send every element of its stated domain to an element of its stated codomain.

Definition: Let \(V\) and \(W\) be vector spaces over \(\mathbb{R}\). A map \(T:V\to W\) is linear if, for every \(\mathbf{u},\mathbf{v}\in V\) and every \(c\in\mathbb{R}\), it satisfies additivity, \(T(\mathbf{u}+\mathbf{v})=T(\mathbf{u})+T(\mathbf{v})\), and scalar homogeneity, \(T(c\mathbf{u})=cT(\mathbf{u})\).

Both requirements are universal: they must hold for all allowable inputs and all real scalars. Trying a few numerical inputs can reveal a failure, but successful numerical tests alone do not prove linearity. To prove a formula-defined map is linear, use arbitrary entries or coefficients and show the two equalities follow from the formula.

Theorem: A map \(T:V\to W\) between real vector spaces is linear if and only if, for all \(\mathbf{u},\mathbf{v}\in V\) and \(a,b\in\mathbb{R}\), \(T(a\mathbf{u}+b\mathbf{v})=aT(\mathbf{u})+bT(\mathbf{v})\).

Proof. Suppose \(T\) is linear. By additivity and then scalar homogeneity, \(T(a\mathbf{u}+b\mathbf{v})=T(a\mathbf{u})+T(b\mathbf{v})=aT(\mathbf{u})+bT(\mathbf{v})\). Conversely, suppose the displayed identity holds for every \(\mathbf{u},\mathbf{v},a,b\). Taking \(a=b=1\) gives additivity. Taking \(a=c\) and \(b=0\) gives \(T(c\mathbf{u}+0\mathbf{v})=cT(\mathbf{u})+0T(\mathbf{v})\). Since \(0\mathbf{v}=\mathbf{0}\) and \(c\mathbf{u}+\mathbf{0}=c\mathbf{u}\), this is scalar homogeneity. The two defining conditions therefore hold, so \(T\) is linear. \(\square\)

This combined identity can be convenient, but in a direct proof it is often clearer to display the additivity and homogeneity calculations separately. That makes it harder to overlook one of the two requirements.

A Coordinate Formula on Vectors

Worked Example: A Map from \(\mathbb{R}^2\) to \(\mathbb{R}^2\)

Define \(T:\mathbb{R}^2\to\mathbb{R}^2\) by \(T((x,y))=(3x-2y,\;x+4y)\). Verify directly that \(T\) is linear.

Take arbitrary columns \(\mathbf{u}=\begin{bmatrix}x_1\\x_2\end{bmatrix}\) and \(\mathbf{v}=\begin{bmatrix}y_1\\y_2\end{bmatrix}\). Their sum is \(\begin{bmatrix}x_1+y_1\\x_2+y_2\end{bmatrix}\), so applying the formula gives

$$ \begin{aligned} T(\mathbf{u}+\mathbf{v}) &=\begin{bmatrix} 3(x_1+y_1)-2(x_2+y_2)\\ (x_1+y_1)+4(x_2+y_2) \end{bmatrix}\\ &=\begin{bmatrix}3x_1-2x_2\\x_1+4x_2\end{bmatrix} +\begin{bmatrix}3y_1-2y_2\\y_1+4y_2\end{bmatrix}\\ &=T(\mathbf{u})+T(\mathbf{v}). \end{aligned} $$

For any \(c\in\mathbb{R}\), scalar multiplication gives

$$ \begin{aligned} T(c\mathbf{u}) &=\begin{bmatrix}3cx_1-2cx_2\\cx_1+4cx_2\end{bmatrix}\\ &=c\begin{bmatrix}3x_1-2x_2\\x_1+4x_2\end{bmatrix} =cT(\mathbf{u}). \end{aligned} $$

These calculations hold for arbitrary \(\mathbf{u},\mathbf{v}\) and \(c\), so they prove both required conditions. As a numerical check, take \(\mathbf{u}=\begin{bmatrix}1\\-1\end{bmatrix}\) and \(\mathbf{v}=\begin{bmatrix}2\\3\end{bmatrix}\). Then \(T(\mathbf{u})=\begin{bmatrix}5\\-3\end{bmatrix}\), \(T(\mathbf{v})=\begin{bmatrix}0\\14\end{bmatrix}\), and \(\mathbf{u}+\mathbf{v}=\begin{bmatrix}3\\2\end{bmatrix}\), so \(T(\mathbf{u}+\mathbf{v})=\begin{bmatrix}9-4\\3+8\end{bmatrix}=\begin{bmatrix}5\\11\end{bmatrix}\). This equals \(T(\mathbf{u})+T(\mathbf{v})=\begin{bmatrix}5\\11\end{bmatrix}\).

The numerical check agrees with the proof, but it is not a substitute for it. The proof works because it covers every pair of vectors and every scalar in the domain.

A Formula on Polynomials

Write \(P_2(\mathbb{R})\) for the real polynomials of degree at most \(2\), including the zero polynomial, and \(P_1(\mathbb{R})\) for those of degree at most \(1\). Differentiation defines a map \(D:P_2(\mathbb{R})\to P_1(\mathbb{R})\), since the derivative of a polynomial of degree at most \(2\) has degree at most \(1\), or is zero.

Worked Example: Differentiation Is Linear

Let \(D(p)=p'\). Verify additivity and scalar homogeneity directly from polynomial coefficients.

Take arbitrary \(p(x)=a+bx+cx^2\) and \(q(x)=d+ex+fx^2\), with real coefficients. Their sum and derivatives are

$$ \begin{aligned} (p+q)(x)&=(a+d)+(b+e)x+(c+f)x^2,\\ D(p+q)&=(b+e)+2(c+f)x,\\ D(p)+D(q)&=(b+2cx)+(e+2fx)\\ &=(b+e)+2(c+f)x. \end{aligned} $$

Thus \(D(p+q)=D(p)+D(q)\). For any \(t\in\mathbb{R}\), the polynomial \(tp\) is \(ta+tbx+tcx^2\), and therefore

$$ D(tp)=tb+2tcx=t(b+2cx)=tD(p). $$

Both equalities hold for arbitrary coefficients and scalar, proving that \(D\) is linear. For a concrete check, take \(p(x)=1+2x+3x^2\) and \(q(x)=2-x+x^2\). Then \(p+q=3+x+4x^2\), so \(D(p+q)=1+8x\). Also \(D(p)=2+6x\) and \(D(q)=-1+2x\), whose sum is \(1+8x\). For homogeneity with \(t=-2\), \(D(-2p)=-4-12x\), while \(-2D(p)=-2(2+6x)=-4-12x\). The direct checks agree.

The formula for differentiation acts on coefficients by multiplying each coefficient by its exponent and lowering the exponent by one. The proof uses that same formula on arbitrary coefficients; it does not depend on any special choice of polynomial.

A Formula on Matrices

Let \(\mathbb{R}^{2\times2}\) denote the real \(2\times2\) matrices. Transposition interchanges rows and columns, and matrix addition and scalar multiplication are defined entry by entry. These operations make it possible to check a map involving the transpose just as directly as a coordinate formula.

Worked Example: A Map Built from Transposition

Define \(S:\mathbb{R}^{2\times2}\to\mathbb{R}^{2\times2}\) by \(S(\mathbf{A})=2\mathbf{A}-\mathbf{A}^{\top}\). Verify that \(S\) is linear.

Take arbitrary matrices \(\mathbf{A}=\begin{bmatrix}a&b\\c&d\end{bmatrix}\) and \(\mathbf{B}=\begin{bmatrix}e&f\\g&h\end{bmatrix}\). Using \((\mathbf{A}+\mathbf{B})^\top=\mathbf{A}^\top+\mathbf{B}^\top\), which follows by transposing each entry, we obtain

$$ \begin{aligned} S(\mathbf{A}+\mathbf{B}) &=2(\mathbf{A}+\mathbf{B})-(\mathbf{A}+\mathbf{B})^\top\\ &=(2\mathbf{A}-\mathbf{A}^\top)+(2\mathbf{B}-\mathbf{B}^\top)\\ &=S(\mathbf{A})+S(\mathbf{B}). \end{aligned} $$

For any \(t\in\mathbb{R}\), transposing each entry also gives \((t\mathbf{A})^\top=t\mathbf{A}^\top\). Hence

$$ S(t\mathbf{A})=2t\mathbf{A}-(t\mathbf{A})^\top =t(2\mathbf{A}-\mathbf{A}^\top) =tS(\mathbf{A}). $$

To check the arithmetic on particular matrices, take \(\mathbf{A}=\begin{bmatrix}1&2\\0&-1\end{bmatrix}\) and \(\mathbf{B}=\begin{bmatrix}3&-2\\4&1\end{bmatrix}\). Then

$$ \begin{aligned} S(\mathbf{A}) &=\begin{bmatrix}2&4\\0&-2\end{bmatrix} -\begin{bmatrix}1&0\\2&-1\end{bmatrix} =\begin{bmatrix}1&4\\-2&-1\end{bmatrix},\\ S(\mathbf{B}) &=\begin{bmatrix}6&-4\\8&2\end{bmatrix} -\begin{bmatrix}3&4\\-2&1\end{bmatrix} =\begin{bmatrix}3&-8\\10&1\end{bmatrix}. \end{aligned} $$

Adding the inputs gives \(\mathbf{A}+\mathbf{B}=\begin{bmatrix}4&0\\4&0\end{bmatrix}\), and consequently

$$ S(\mathbf{A}+\mathbf{B}) =\begin{bmatrix}8&0\\8&0\end{bmatrix} -\begin{bmatrix}4&4\\0&0\end{bmatrix} =\begin{bmatrix}4&-4\\8&0\end{bmatrix} =S(\mathbf{A})+S(\mathbf{B}). $$

For the scalar check, \(3\mathbf{A}=\begin{bmatrix}3&6\\0&-3\end{bmatrix}\), so

$$ S(3\mathbf{A}) =\begin{bmatrix}6&12\\0&-6\end{bmatrix} -\begin{bmatrix}3&0\\6&-3\end{bmatrix} =\begin{bmatrix}3&12\\-6&-3\end{bmatrix} =3S(\mathbf{A}). $$

The arbitrary-matrix calculations establish linearity; the numerical calculations verify the formula on these selected inputs.

Consequences of the Two Tests

Once additivity and scalar homogeneity hold, some useful identities follow without additional assumptions. These are often quick checks when evaluating a proposed formula.

Proposition: If \(T:V\to W\) is linear over \(\mathbb{R}\), then \(T(\mathbf{0})=\mathbf{0}\) and \(T(-\mathbf{v})=-T(\mathbf{v})\) for every \(\mathbf{v}\in V\).

Proof. By scalar homogeneity with scalar \(0\), \(T(\mathbf{0})=T(0\mathbf{v})=0T(\mathbf{v})=\mathbf{0}\). Also, \(-\mathbf{v}=(-1)\mathbf{v}\), so homogeneity with scalar \(-1\) gives \(T(-\mathbf{v})=(-1)T(\mathbf{v})=-T(\mathbf{v})\). These conclusions use only the defining scalar-homogeneity condition. \(\square\)

The first identity gives a fast way to disprove linearity: if a proposed formula sends the zero input somewhere other than the zero output, it cannot be linear. Passing this check is necessary but not sufficient; additivity and homogeneity still need to be established.

Common Pitfall: An Added Constant

Consider \(F:\mathbb{R}^2\to\mathbb{R}^2\) defined by \(F((x,y))=(x+1,y)\). It is tempting to call this linear because each coordinate is built from \(x\) and \(y\) using simple operations. But the constant \(1\) changes the behavior under scalar multiplication. For \(\mathbf{u}=\begin{bmatrix}1\\0\end{bmatrix}\),

$$ F(2\mathbf{u})=F\left(\begin{bmatrix}2\\0\end{bmatrix}\right) =\begin{bmatrix}3\\0\end{bmatrix}, \qquad 2F(\mathbf{u})=2\begin{bmatrix}2\\0\end{bmatrix} =\begin{bmatrix}4\\0\end{bmatrix}. $$

Since \(\begin{bmatrix}3\\0\end{bmatrix}\ne\begin{bmatrix}4\\0\end{bmatrix}\), scalar homogeneity fails, so \(F\) is not linear. The zero-input check catches the same problem: \(F(\mathbf{0})=\begin{bmatrix}1\\0\end{bmatrix}\ne\mathbf{0}\). The incorrect argument would be “the formula uses coordinates and constants, so it is linear”; the correction is to test the two defining identities, not the apparent simplicity of the formula.

For a formula-defined map, a dependable proof has three parts: state the domain and codomain, take arbitrary inputs and expand the formula to prove additivity, and then take an arbitrary scalar and expand again to prove homogeneity. If either identity fails even once, the map is not linear.

Check Your Understanding

For each proposed linearity claim, distinguish a proof for arbitrary inputs from a check on a single example.

  1. For \(T:\mathbb{R}^2\to\mathbb{R}^2\) defined by \(T((x,y))=(x+2y,3x-y)\), write the additivity calculation using arbitrary input coordinates.
  2. For \(L(p)=p'\) on \(P_3(\mathbb{R})\), identify the codomain and verify scalar homogeneity for \(p(x)=2-x+4x^3\) and scalar \(t=2\).
  3. For \(Q(\mathbf{A})=\mathbf{A}^{\top}\) on \(\mathbb{R}^{2\times2}\), prove additivity and scalar homogeneity by using arbitrary matrices.
  4. Show that \(G((x,y))=(x,y+2)\) is not linear by checking one defining condition with a specific input.
  5. State the combined two-input identity equivalent to linearity, and explain how setting its scalars gives additivity and homogeneity.

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon