Three Tests for Linearity
A formula can look simple and still fail to define a linear map. Constants can shift outputs, products can mix coordinates, and squares or norms can respond differently to scalar multiplication. To diagnose these formulas, test the defining properties of linearity directly. A single failed test is enough to show that a map is not linear; a few successful sample calculations, however, are not enough to prove that it is linear.
Throughout, the scalar field is \(\mathbb{R}\). Let \(V\) and \(W\) be real vector spaces, and let \(T:V\to W\) be a map. Linearity requires two identities to hold for every \(\mathbf{u},\mathbf{v}\in V\) and every \(c\in\mathbb{R}\): preservation of addition and preservation of scalar multiplication.
These tests are universal conditions, not a checklist to be tried on just a few convenient inputs. When a formula is suspected of being nonlinear, choose inputs that make its special feature visible: use \(\mathbf{0}\) to expose a constant shift, two vectors with different nonzero coordinates to expose a product, or a negative scalar to test a norm. To prove nonlinearity, report the failed identity and the particular inputs that disprove it.
Start with the Zero Vector
For a linear map, scalar homogeneity applied with \(c=0\) forces \(T(\mathbf{0})=\mathbf{0}\). This is often the quickest test, particularly for formulas containing an added constant. It is a necessary condition, not a sufficient one: many nonlinear maps also send zero to zero.
Proof. Since \(\mathbf{0}=0\mathbf{v}\) for any \(\mathbf{v}\in V\), homogeneity gives \(T(\mathbf{0})=T(0\mathbf{v})=0T(\mathbf{v})=\mathbf{0}\). The contrapositive says that if \(T(\mathbf{0})\ne\mathbf{0}\), then \(T\) cannot be linear. \(\square\)
Worked Example: A Formula with Constant Terms
Consider \(T:\mathbb{R}^2\to\mathbb{R}^2\) given by \(T(x,y)=(x+2y+3,-x+4)\). Determine whether \(T\) is linear.
Evaluate the map at the zero vector. Substituting \(x=0\) and \(y=0\) gives
Therefore \(T\) is not linear. The constants are visible in the nonzero output at the origin, so there is no need to test other inputs. Check: homogeneity with \(c=0\) would require \(T(0\mathbf{v})=0T(\mathbf{v})=\mathbf{0}\), but the left side is \(T(\mathbf{0})=(3,4)\) for every choice of \(\mathbf{v}\).
This test also explains precisely how a constant shift affects a linear map. If \(L:V\to W\) is linear and \(\mathbf{b}\in W\), define \(A(\mathbf{v})=L(\mathbf{v})+\mathbf{b}\). The shift preserves linearity exactly when \(\mathbf{b}=\mathbf{0}\).
Proof. First suppose \(A\) is linear. Then \(A(\mathbf{0})=\mathbf{0}\) by the proposition. Since \(L\) is linear, \(L(\mathbf{0})=\mathbf{0}\), so \(A(\mathbf{0})=L(\mathbf{0})+\mathbf{b}=\mathbf{b}\). Thus \(\mathbf{b}=\mathbf{0}\). Conversely, if \(\mathbf{b}=\mathbf{0}\), then \(A=L\), which is linear by hypothesis. Therefore \(A\) is linear exactly when \(\mathbf{b}=\mathbf{0}\). \(\square\)
Test Sums and Scalar Multiples
If the zero test passes, check additivity and homogeneity next. A useful strategy is to choose simple vectors that isolate the terms in the formula. For products of coordinates, vectors with one nonzero coordinate often make the product vanish individually but not after the vectors are added. For squares, scalar homogeneity usually exposes the change from a factor of \(c\) to a factor of \(c^2\).
Worked Example: A Product of Coordinates
Let \(F:\mathbb{R}^2\to\mathbb{R}\) be \(F(x,y)=xy\). It passes the zero test, since \(F(0,0)=0\). Test additivity using \(\mathbf{u}=(1,0)\) and \(\mathbf{v}=(0,1)\).
Each vector has product of coordinates equal to zero, while their sum has both coordinates nonzero:
Additivity fails, so \(F\) is not linear. Check: the inputs sum to \((1,1)\), and the two sides of the additivity identity are exactly \(1\) and \(0\). The formula has a useful general sum difference: for \(\mathbf{u}=(x,y)\) and \(\mathbf{v}=(r,s)\),
This difference need not be zero; in the chosen example it is \(1\). The map passes the zero test but fails the sum test, illustrating why one successful check cannot settle linearity.
Worked Example: Squaring a Real Input
Consider \(S:\mathbb{R}\to\mathbb{R}\) defined by \(S(x)=x^2\). Since \(S(0)=0\), the zero test gives no reason to reject linearity. Test homogeneity with \(x=1\) and \(c=2\):
Since \(4\ne2\), homogeneity fails and \(S\) is not linear. Check: the two expressions compared are precisely \(S(cx)\) and \(cS(x)\) for the same \(c=2\) and \(x=1\). The sum test also detects the problem: with \(x=y=1\), \(S(1+1)=4\), whereas \(S(1)+S(1)=1+1=2\).
The algebra explains why these failures are typical. For all real \(x,y,c\),
Neither difference is always zero. In the chosen sum test, \(2xy=2\); in the homogeneity test, \((c^2-c)x^2=(4-2)\cdot1=2\), matching the difference \(4-2\).
Norms and Negative Scalars
The Euclidean norm \(\|\mathbf{x}\|\) measures the length of a vector \(\mathbf{x}\in\mathbb{R}^n\) and has values in \(\mathbb{R}\). The map from vectors to their lengths passes the zero test. It also satisfies \(\|c\mathbf{x}\|=|c|\|\mathbf{x}\|\), so it agrees with scalar homogeneity for nonnegative \(c\). But linearity requires homogeneity for every real scalar, including negative ones. A negative scalar can therefore be a particularly effective test.
Worked Example: The Norm Map
Let \(N:\mathbb{R}^2\to\mathbb{R}\) be \(N(\mathbf{x})=\|\mathbf{x}\|\), where \(\|(x,y)\|=\sqrt{x^2+y^2}\). Test homogeneity at \(\mathbf{x}=(1,0)\) with \(c=-1\):
The outputs \(1\) and \(-1\) differ, so \(N\) is not linear. Check: the norm of \((-1,0)\) is \(1\), not \(-1\), and the homogeneity test requires the signed scalar on the right side.
Additivity fails as well. Take \(\mathbf{u}=(1,0)\) and \(\mathbf{v}=(-1,0)\). Then
Thus \(N(\mathbf{u}+\mathbf{v})\ne N(\mathbf{u})+N(\mathbf{v})\). The calculation is exact and confirms the same conclusion using a different test.
What Successful Tests Can—and Cannot—Show
The additivity-and-homogeneity test gives a complete criterion, not just a way to find counterexamples. Both identities must hold for all inputs and all real scalars. If they do, the map is linear by definition; if one fails, the map is nonlinear. This distinction matters because checking a handful of inputs only samples the universal conditions.
Proof. If \(T\) is linear, preservation of addition and scalar multiplication holds for all the stated inputs by the definition of linearity. Conversely, suppose both identities hold for every such choice. Those are exactly the two conditions in the definition of a linear map, so \(T\) is linear. \(\square\)
For formulas built from several terms, it helps to separate them conceptually. A linear combination of coordinates contributes no constant term and scales in step with its input. An added nonzero constant is caught at \(\mathbf{0}\). Products and squares can create extra terms when inputs are added or scaled. A norm can reverse the sign of a scalar on the right side of the homogeneity test, while the norm itself remains nonnegative.
Common Pitfall: Treating One Passed Test as a Proof
A common error is to test only \(\mathbf{0}\), observe that the output is zero, and conclude that the map is linear. For the square map, the calculation \(S(0)=0\) is correct, but it does not establish either of the two identities required for linearity. The correction is to test another defining property: for \(S(x)=x^2\), \(S(2\cdot1)=4\), whereas \(2S(1)=2\), so \(S\) is nonlinear.
Another tempting shortcut is to test homogeneity only with positive scalars for the norm map. For example, \(N(2(1,0))=2=2N(1,0)\) is correct, but it does not verify the condition for all \(c\in\mathbb{R}\). At \(c=-1\), \(N((-1)(1,0))=1\), while \((-1)N(1,0)=-1\). The negative-scalar test corrects the incomplete conclusion.
When testing a map, write down the identity being checked before substituting. For additivity, compare \(T(\mathbf{u}+\mathbf{v})\) with \(T(\mathbf{u})+T(\mathbf{v})\); for homogeneity, compare \(T(c\mathbf{v})\) with \(cT(\mathbf{v})\). This keeps the two sides distinct and makes a counterexample decisive.
Check Your Understanding
For each map, use the stated test and report the exact values on both sides.
- Does \(T(x,y)=(2x-y+1,\,x+3)\) pass the zero test?
- Show that \(F(x,y)=x^2+y\) is not linear by testing homogeneity with a specific input and scalar.
- For \(G(x,y)=xy\), find vectors that show additivity fails.
- Explain why checking \(N(2\mathbf{v})=2N(\mathbf{v})\) for a norm map does not establish linearity.
- State the two identities that must hold for every input in order for a map between real vector spaces to be linear.