Nonlinearity (source code)

= Nonlinearity

= Nonlinear
{synonym}

\b[Nonlinearity] is failure of the <linearity> conditions appropriate to the objects being studied. For a <function> $f:V\to W$ between <vector spaces> over the same <field>, being a <linear map> means
$$
f(au+bv)=af(u)+bf(v)
$$
for all $u,v\in V$ and all <scalars> $a,b$. A function is nonlinear in this sense if even one permitted choice violates the identity. The spaces and their operations are therefore part of the claim.<Linear Algebra Done Right by Sheldon Axler (4th edition)>[§3A, definition3.1, additivity and homogeneity]{ref}

For $f:\mathbb R\to\mathbb R$ with $f(x)=x^2$, choose $u=v=1$ and $a=b=1$. Then
$$
f(1+1)=4\ne2=f(1)+f(1).
$$
The extra term in $(u+v)^2=u^2+2uv+v^2$ explains the failure of superposition. Doubling an input also multiplies its squared output by four, rather than two.

A straight-line graph alone does not establish linearity in <linear algebra>. The <affine map> $g(x)=2x+3$ has a straight-line graph but $g(0)=3\ne0$, whereas every linear map sends zero to zero. Its translated change $g(x+h)-g(x)=2h$ is linear in the increment $h$. This distinction matters when a physical instrument has an offset or a model is expressed relative to a nonzero operating point.

A nonlinear function can still have a useful local linear approximation. For the same square function,
$$
f(3+h)=9+6h+h^2.
$$
The <derivative> at3 gives the linear increment $6h$, while the exact omitted term is $h^2$. At $h=0.01$, the actual change is0.0601 and the linear prediction is0.06. At $h=1$, the actual change is7 and the prediction is6. Local accuracy over small increments does not turn the original function into a linear map. It states that the nonlinear remainder is small on a specified scale.