Tutorials › Linear Algebra › Testing Whether a Formula Is Linear

Linear Transformations of R^n · Tutorial 187 of 1000

Testing Whether a Formula Is Linear

Use the defining tests of additivity and homogeneity to decide whether a formula is linear, and identify why nonzero constant terms fail.

Intermediate 9 min read

What You'll Learn

  • State the additivity and homogeneity conditions for a linear map from \(\mathbb{R}^n\) to \(\mathbb{R}^m\).
  • Check a formula by applying both conditions to arbitrary inputs and real scalars.
  • Disprove linearity with a single explicit counterexample.
  • Distinguish a nonzero constant term from the variable-dependent part of an affine formula.
  • Explain why checking only selected inputs cannot establish linearity.

Two Tests for a Linear Formula

A formula can look simple without defining a linear map. For instance, a formula may contain a product of input coordinates or add a fixed vector after applying a linear rule. The reliable test is not its appearance: it is whether the formula preserves vector addition and scalar multiplication for every input and every real scalar.

Throughout, the scalar field is \(\mathbb{R}\). A map \(T:\mathbb{R}^n\to\mathbb{R}^m\) takes column vectors as inputs and returns column vectors as outputs. The map is additive if \(T(\mathbf{u}+\mathbf{v})=T(\mathbf{u})+T(\mathbf{v})\) for every \(\mathbf{u},\mathbf{v}\in\mathbb{R}^n\). It is homogeneous if \(T(c\mathbf{u})=cT(\mathbf{u})\) for every \(\mathbf{u}\in\mathbb{R}^n\) and every \(c\in\mathbb{R}\).

Definition: A map \(T:\mathbb{R}^n\to\mathbb{R}^m\) is linear if it is both additive and homogeneous. Both conditions must hold for all inputs and all real scalars, not merely for a selection of examples.

When testing a formula, keep the two requirements separate. To test additivity, compare the formula evaluated at a sum with the sum of the two outputs. To test homogeneity, compare the formula evaluated at a scalar multiple with the same scalar times the output. If either comparison fails for even one choice of inputs, the map is not linear. To prove linearity directly, by contrast, a calculation must establish both identities for arbitrary inputs and scalars.

Consequences of the Tests

Linearity forces the zero vector to map to the zero vector. This is often the quickest initial check, especially for formulas with a constant term. It is a necessary condition, not by itself a sufficient test: a formula can send zero to zero and still fail additivity or homogeneity.

Proposition: If \(T:\mathbb{R}^n\to\mathbb{R}^m\) is linear, then \(T(\mathbf{0})=\mathbf{0}\). Also, \(T(-\mathbf{u})=-T(\mathbf{u})\) for every \(\mathbf{u}\in\mathbb{R}^n\).

Proof. By homogeneity with scalar \(c=0\), \(T(\mathbf{0})=T(0\mathbf{u})=0T(\mathbf{u})=\mathbf{0}\). For the second claim, homogeneity with scalar \(c=-1\) gives \(T(-\mathbf{u})=(-1)T(\mathbf{u})=-T(\mathbf{u})\). \(\square\)

The definition also connects these two tests to preservation of linear combinations. A linear combination of two vectors is \(a\mathbf{u}+b\mathbf{v}\), where \(a,b\in\mathbb{R}\). A linear map must send that combination to the same combination of the outputs.

Theorem: A map \(T:\mathbb{R}^n\to\mathbb{R}^m\) is linear if and only if \(T(a\mathbf{u}+b\mathbf{v})=aT(\mathbf{u})+bT(\mathbf{v})\) for every \(\mathbf{u},\mathbf{v}\in\mathbb{R}^n\) and \(a,b\in\mathbb{R}\).

Proof. Suppose first that \(T\) is linear. Additivity gives \(T(a\mathbf{u}+b\mathbf{v})=T(a\mathbf{u})+T(b\mathbf{v})\). Homogeneity gives \(T(a\mathbf{u})=aT(\mathbf{u})\) and \(T(b\mathbf{v})=bT(\mathbf{v})\). Substitution proves the stated identity. Conversely, suppose the identity holds for every choice of inputs and scalars. Set \(a=b=1\) to obtain \(T(\mathbf{u}+\mathbf{v})=T(\mathbf{u})+T(\mathbf{v})\), so \(T\) is additive. Set \(b=0\) and \(\mathbf{v}=\mathbf{0}\). The assumed identity then gives \(T(a\mathbf{u})=aT(\mathbf{u})+0T(\mathbf{0})\). Taking \(a=1\) in the assumed identity with \(\mathbf{u}=\mathbf{0}\) and \(\mathbf{v}=\mathbf{0}\) first gives \(T(\mathbf{0})=2T(\mathbf{0})\), hence \(T(\mathbf{0})=\mathbf{0}\). Therefore \(T(a\mathbf{u})=aT(\mathbf{u})\) for every real \(a\), so \(T\) is homogeneous as well as additive, and is linear. \(\square\)

Proving a Formula Is Linear

Worked Example: A Formula with Linear Coordinates

Test whether \(T:\mathbb{R}^2\to\mathbb{R}^2\), defined by \(T(x,y)=(2x-y,\;x+3y)\), is linear.

Let \(\mathbf{u}=(x_1,y_1)\), \(\mathbf{v}=(x_2,y_2)\), and \(c\in\mathbb{R}\). For additivity, evaluate the formula at the sum:

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

For homogeneity, evaluate the formula at \(c\mathbf{u}=(cx_1,cy_1)\):

$$ \begin{aligned} T(c\mathbf{u}) &=T(cx_1,cy_1)\\ &=(2cx_1-cy_1,\;cx_1+3cy_1)\\ &=c(2x_1-y_1,\;x_1+3y_1)\\ &=cT(\mathbf{u}). \end{aligned} $$

These calculations hold for arbitrary inputs and an arbitrary real \(c\), so they prove both required conditions. As a numerical check, take \(\mathbf{u}=(1,2)\) and \(\mathbf{v}=(3,-1)\). Then \(T(\mathbf{u})=(0,7)\), \(T(\mathbf{v})=(7,0)\), and \(T(\mathbf{u}+\mathbf{v})=T(4,1)=(7,7)=(0,7)+(7,0)\). Also \(T(2\mathbf{u})=T(2,4)=(0,14)=2T(\mathbf{u})\). The checks agree with the general proof.

In this example, each output coordinate is a sum of constant multiples of the input coordinates. That pattern often suggests linearity, but the proof comes from verifying the identities, not from recognizing a visual pattern. In particular, every scalar \(c\) is included; the homogeneity condition covers \(c=0\), negative scalars, and positive scalars.

Disproving Linearity with a Counterexample

To disprove a universal condition, one counterexample is enough. It is not necessary to find a general description of every failure. A formula can pass one test and fail another, or fail the same test for just one pair of inputs. Either way, it is not linear.

Worked Example: A Product of Coordinates

Test \(F:\mathbb{R}^2\to\mathbb{R}^2\), defined by \(F(x,y)=(x+y,\;xy)\).

Let \(\mathbf{e}_1=(1,0)\) and \(\mathbf{e}_2=(0,1)\). The individual outputs are \(F(\mathbf{e}_1)=(1,0)\) and \(F(\mathbf{e}_2)=(1,0)\). Thus

$$ F(\mathbf{e}_1)+F(\mathbf{e}_2)=(2,0), \qquad F(\mathbf{e}_1+\mathbf{e}_2)=F(1,1)=(2,1). $$

Since \((2,0)\ne(2,1)\), additivity fails, so \(F\) is not linear. Homogeneity also fails: \(F(1,1)=(2,1)\), and therefore \(2F(1,1)=(4,2)\), whereas \(F(2,2)=(4,4)\). The unequal outputs give a second counterexample. The first failed test is already sufficient to settle the question.

Check: The mismatch in the second coordinate of the additivity test is \(0\ne1\); in the homogeneity test it is \(2\ne4\). Both comparisons use the formula directly.

A useful discipline is to write the two sides of the proposed identity before simplifying. For additivity, those sides are \(F(\mathbf{u}+\mathbf{v})\) and \(F(\mathbf{u})+F(\mathbf{v})\); for homogeneity, they are \(F(c\mathbf{u})\) and \(cF(\mathbf{u})\). This prevents accidentally comparing quantities that are not required to be equal.

Affine Formulas and Constant Terms

An affine map in this setting has the form \(G(\mathbf{x})=L(\mathbf{x})+\mathbf{b}\), where \(L:\mathbb{R}^n\to\mathbb{R}^m\) is linear and \(\mathbf{b}\in\mathbb{R}^m\) is fixed. The fixed vector translates every output by the same amount. If \(\mathbf{b}\ne\mathbf{0}\), the map is affine but not linear.

Theorem: If \(L:\mathbb{R}^n\to\mathbb{R}^m\) is linear and \(\mathbf{b}\in\mathbb{R}^m\), then \(G(\mathbf{x})=L(\mathbf{x})+\mathbf{b}\) is linear if and only if \(\mathbf{b}=\mathbf{0}\).

Proof. If \(G\) is linear, the zero-vector property gives \(G(\mathbf{0})=\mathbf{0}\). Since \(L\) is linear, \(L(\mathbf{0})=\mathbf{0}\), and hence \(G(\mathbf{0})=L(\mathbf{0})+\mathbf{b}=\mathbf{b}\). Therefore \(\mathbf{b}=\mathbf{0}\). Conversely, if \(\mathbf{b}=\mathbf{0}\), then \(G=L\), which is linear by assumption. This proves both directions. \(\square\)

Worked Example: A Translation of a Linear Formula

Consider \(G:\mathbb{R}^2\to\mathbb{R}^2\), defined by \(G(x,y)=(x+2y+1,\;3x-y-2)\). Separate the variable-dependent part from the constant vector:

$$ G(x,y)=\underbrace{(x+2y,\;3x-y)}_{L(x,y)} +\underbrace{(1,-2)}_{\mathbf{b}}. $$

The map \(L\) is linear: for \(\mathbf{u}=(x_1,y_1)\), \(\mathbf{v}=(x_2,y_2)\), and \(c\in\mathbb{R}\), distributing the coordinates gives \(L(\mathbf{u}+\mathbf{v})=L(\mathbf{u})+L(\mathbf{v})\) and \(L(c\mathbf{u})=cL(\mathbf{u})\). But \(G(\mathbf{0})=(1,-2)\ne(0,0)\), so the zero-vector property already proves that \(G\) is not linear.

The failure is also visible directly in additivity at \(\mathbf{u}=\mathbf{v}=\mathbf{0}\):

$$ G(\mathbf{0}+\mathbf{0})=(1,-2), \qquad G(\mathbf{0})+G(\mathbf{0})=(1,-2)+(1,-2)=(2,-4). $$

These are unequal. Homogeneity fails as well when \(c=0\) and \(\mathbf{u}=\mathbf{0}\): \(G(0\mathbf{0})=(1,-2)\), while \(0G(\mathbf{0})=(0,0)\). Thus the nonzero constant term prevents both the zero-vector condition and the two preservation tests. The calculations agree with the theorem because \(\mathbf{b}=(1,-2)\ne\mathbf{0}\).

Common Mistakes When Testing Formulas

Mistake: checking only a few inputs and concluding linearity. For example, with \(F(x,y)=(x+y,xy)\), one may notice \(F(2,0)=2F(1,0)\): both sides equal \((2,0)\). That single successful check does not prove homogeneity for every input and scalar, and it says nothing about additivity. The corrected approach is to establish the identities for arbitrary inputs, or to give a counterexample when the goal is to disprove linearity.

Mistake: assuming a zero output at zero is enough. The product formula above has \(F(0,0)=(0,0)\), yet it is not linear because its additivity test fails. The zero-vector property is a quick necessary check: a nonzero value at zero rules out linearity, but a zero value at zero does not establish it.

Mistake: treating a constant term as if it scales with the input. In \(G(x,y)=(x+2y+1,3x-y-2)\), the constants \(1\) and \(-2\) do not become \(c\) times themselves when the input is multiplied by \(c\). The explicit comparison \(G(\mathbf{0})=(1,-2)\ne\mathbf{0}\) exposes the problem immediately.

These checks matter because linearity is a precise structural condition: it guarantees that sums and scalar multiples can be handled by applying the map to each component separately. A formula that fails either test may still be useful, and an affine formula may preserve some geometric features, but neither should be called a linear map unless both defining conditions hold.

Check Your Understanding

For each question, identify whether the task is to prove a condition for all inputs or to disprove it with a specific counterexample.

  1. For \(H:\mathbb{R}^2\to\mathbb{R}^2\), \(H(x,y)=(x-3y,\;2x+y)\), verify additivity and homogeneity using arbitrary inputs.
  2. For \(Q:\mathbb{R}\to\mathbb{R}\), \(Q(x)=x^2\), find a specific scalar and input that disprove homogeneity.
  3. Explain why \(K(x,y)=(x+y+4,\;x-y)\) cannot be linear without testing arbitrary vectors.
  4. Does \(F(x,y)=(x+y,xy)\) pass the zero-vector test? Explain why that answer does not settle linearity.
  5. State the condition on \(\mathbf{b}\) under which \(G(\mathbf{x})=L(\mathbf{x})+\mathbf{b}\), with \(L\) linear, is linear, and justify both directions.

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