# Linear transformation

In mathematics, a linear transformation (also called linear map or linear operator) is a function between two vector spaces that preserves the operations of vector addition and scalar multiplication. In other words, it "preserves linear combinations".

In the language of abstract algebra, a linear transformation is a homomorphism of vector spaces.

## Definition and first consequences

If V and W are vector spaces over the same ground field K, one says that f : VW is a linear transformation if for any two vectors x and y in V and any scalar a in K, one has

$\displaystyle f(x+y)=f(x)+f(y) \,$ (additivity)
$\displaystyle f(ax)=af(x) \,$               (homogeneity).

This is equivalent to stating that f   "preserves linear combinations", that is, for any vectors x1, ..., xm and scalars a1, ..., am, the equality

$\displaystyle f(a_1 x_1+\cdots+a_m x_m)=a_1 f(x_1)+\cdots+a_m f(x_m)$

holds.

Occasionally, V and W can be considered to be vector spaces over different ground fields. It is then formal to specify which of these ground fields was used for the definition of "linear". If V and W are considered as spaces over the field K as above, we talk about K-linear maps. For example, the conjugation of complex numbers is an R-linear map CC, but it is not C-linear.

## Examples

• If A is an m × n matrix, then A defines a linear transformation from Rn to Rm by sending the column vector xRn to the column vector AxRm. Every linear transformation between finite-dimensional vector spaces arises in this fashion; see the following section.
• The integral yields a linear map from the space of all real-valued integrable functions on some interval to R
• Differentiation is a linear transformation from the space of all differentiable functions to the space of all functions.
• If V and W are finite-dimensional vector spaces over a field F, then functions that map linear transformations f : VW to dimF(W)-by-dimF(V) matrices in the way described in the sequel are themselves linear transformations.

## Matrices

If V and W are finite-dimensional, and one has chosen bases in those spaces, then every linear transformation from V to W can be represented as a matrix; this is useful because it allows concrete calculations. Conversely, matrices yield examples of linear transformations: if A is a real m-by-n matrix, then the rule f(x) = Ax describes a linear transformation RnRm (see Euclidean space).

Let $\displaystyle \{v_1, \cdots, v_n\}$ be a basis for V. Then every vector v in V is uniquely determined by the coefficients $\displaystyle c_1, \cdots, c_n$ in

$\displaystyle c_1 v_1+\cdots+c_n v_n.$

If f : VW is a linear transformation,

$\displaystyle f(c_1 v_1+\cdots+c_n v_n)=c_1 f(v_1)+\cdots+c_n f(v_n),$

which implies that the function f is entirely determined by the values of $\displaystyle f(v_1),\cdots,f(v_n).$

Now let $\displaystyle \{w_1, \dots, w_m\}$ be a basis for W. Then we can represent the values of each $\displaystyle f(v_j)$ as

$\displaystyle f(v_j)=a_{1j} w_1 + \cdots + a_{mj} w_m.$

Thus, the function f is entirely determined by the values of $\displaystyle a_{i,j}.$

If we put these values into an m-by-n matrix M, then we can conveniently use it to compute the value of f for any vector in V. For if we place the values of $\displaystyle c_1, \cdots, c_n$ in an n-by-1 matrix C, we have MC = f(v).

A single linear transformation may be represented by many matrices. This is because the values of the elements of the matrix depend on the bases that are chosen.

## Examples of linear transformation matrices

Some special cases of linear transformations of two-dimensional space R2 are illuminating:

• rotations: no real eigenvectors (complex eigenvalue/eigenvector pairs exist). Example (rotation by 90 degrees counterclockwise):
$\displaystyle A=\begin{bmatrix}0 & -1\\ 1 & 0\end{bmatrix}.$
• reflection: eigenvectors are perpendicular and parallel to the line of symmetry. The eigenvalues are -1 and 1, respectively. Example (symmetry against the x axis):
$\displaystyle A=\begin{bmatrix}1 & 0\\ 0 & -1\end{bmatrix}.$
• scaling:
• uniform scaling: all vectors are eigenvectors, and the eigenvalue is the scale factor. Example (scale by 2 in all directions):
$\displaystyle A=\begin{bmatrix}2 & 0\\ 0 & 2\end{bmatrix}.$
• directional scaling: eigenvalues are the scale factor and 1
• directionally differential scaling: eigenvalues are the scale factors
• projection onto a line: vectors on the line are eigenvectors with eigenvalue 1 and vectors in the direction of projection (which may or may not be perpendicular) are eigenvectors with eigenvalue 0. Example:
$\displaystyle A=\begin{bmatrix}0 & 0\\ 0 & 1\end{bmatrix}.$

## Forming new linear transformations from given ones

The composition of linear transformations is linear: if f : VW and g : WZ are linear, then so is g o f : VZ.

If f1 : VW and f2 : VW are linear, then so is their sum f1 + f2 (which is defined by (f1 + f2)(x) = f1(x) + f2(x)).

If f : VW is linear and a is an element of the ground field K, then the map af, defined by (af)(x) = a (f(x)), is also linear.

Thus the set L(V,W) of linear maps from V to W forms a vector space over K itself. Furthermore, in the case that V=W, this vector space is an associative algebra under composition of maps, since the composition of two linear maps is again a linear map, and the composition of maps is always associative. This case is discussed in more detail below.

Given again the finite dimensional case, if bases have been chosen, then the composition of linear maps corresponds to the matrix multiplication, the addition of linear maps corresponds to the matrix addition, and the multiplication of linear maps with scalars corresponds to the multiplication of matrices with scalars.

## Endomorphisms and automorphisms

A linear transformation f : VV is an endomorphism of V; the set of all such endomorphisms End(V) together with addition, composition and scalar multiplication as defined above forms an associative algebra with identity element over the field K (and in particular a ring). The identity element of this algebra is the identity map id : VV.

A bijective endomorphism of V is called an automorphism of V. The composition of two automorphisms is again an automorphism, and the set of all automorphisms of V forms a group, the automorphism group of V which is denoted by Aut(V) or GL(V).

If V has finite dimension n, then End(V) is isomorphic to the associative algebra of all n by n matrices with entries in K. The automorphism group of V is isomorphic to the general linear group GL(n, K) of all n by n invertible matrices with entries in K.

## Kernel and image

If f : VW is linear, we define the kernel and the image of f by

$\displaystyle \ker(f)=\{\,x\in V:f(x)=0\,\}$
$\displaystyle \operatorname{im}(f)=\{\,f(x):x\in V\,\}$

ker(f) is a subspace of V and im(f) is a subspace of W. The following dimension formula is often useful:

$\displaystyle \dim(\ker( f )) + \dim(\operatorname{im}( f )) = \dim( V ) \,$

The number dim(im(f)) is also called the rank of f and written as rk(f), or sometimes, ρ(f); the number dim(ker(f)) is called the nullity of f and written as ν(f). If V and W are finite dimensional, bases have been chosen and f is represented by the matrix A, then the rank and nullity of f are equal to the rank and nullity of the matrix A, respectively.

## Continuity

A linear operator between topological vector spaces, for example normed spaces, may also be continuous and therefore be a continuous linear operator. On a normed space, a linear operator is continuous iff it is bounded, for example, when the domain is finite-dimensional. If the domain is infinite-dimensional, then there may be discontinuous linear operators. An example of an unbounded, hence not continuous, linear transformation is differentiation, with the maximum norm (a function with small values can have a derivative with large values).

## Applications

A specific application of linear transformations is in the field of computational neuroscience. An example of a system being modeled is the innervation of V1 (primary visual cortex) by the retina. This transformation is called the logmap transformation. This kind of transformation is known as a domain coordinate transformation and provides a mathematical model of how neural states can be conferred within the system (CNS and PNS), when a change of state is required, such as from the retina to V1 as previously mentioned.

Another specific application is for geometric transformations, such as those performed in computer graphics, where the translation, rotation and scaling of 2D or 3D objects is performed by the use of a transformation matrix.

Another application of these transformations is in compiler optimizations of nested loop code, and in parallelizing compiler techniques.