Linear and Affine Maps

Here are some equivalent definitions of linear or affine functions and maps.

A map f : mathbf{R}^n rightarrow mathbf{R}^m is linear if and only if either one of the following conditions hold.

  • f preserves scaling and addition of its arguments:

    • for every x in mathbf{R}^n, and alpha in mathbf{R}, f(alpha x) = alpha f(x); and

    • for every x_1,x_2 in mathbf{R}^n, f(x_1+x_2) = 		f(x_1)+f(x_2).

  • f vanishes at the origin: f(0) = 0, and transforms any line segment in mathbf{R}^n into another segment in mathbf{R}^m:

 forall : x, y in mathbf{R}^n, ;; forall : lambda in [0,1] ~:~  f(lambda x + (1-lambda) y) = lambda f(x) + (1-lambda) f(y).
  • f is differentiable, vanishes at the origin, and the matrix of its derivatives is constant.

  • There exist A in mathbf{R}^{m times n} such that

 forall : x in mathbf{R}^n ~:~ f(x) = Ax .

A map f : mathbf{R}^n rightarrow mathbf{R}^m is affine if and only if the map g  : mathbf{R}^n rightarrow mathbf{R}^m with values g(x) = f(x) - f(0) is linear.

Example: the function f : mathbf{R}^3 rightarrow mathbf{R}, with values

 f(x) = -2.1x_1+3.5 x_2 +4.2x_3 + alpha

is linear when alpha = 0, and affine otherwise. In contrast, the function with values

 f(x) = -2.1x_1+3.5 x_2x_3 +4.2x_3 + alpha

is not linear nor affine, whatever the value of alpha.