An

**affine transformation**or

**affine map**(from the Latin,

*affinis*, "connected with") between two vector spaces consists of a linear transformation followed by a translation. Intuitively, these are precisely the functions that map straight lines to straight lines.

A linear transformation is a function that preserves all linear combinations; an affine transformation is a function that preserves all affine combinations. An **affine combination** is a linear combination in which the sum of the coefficients is 1.

An **affine subspace** of a vector space is a coset of a linear subspace; i.e., it is the result of adding a constant vector to every element of the linear subspace.
A linear subspace of a vector space is a subset that is closed under linear combinations; an affine subspace is one that is closed under affine combinations.

Just as members of a set of vectors are linearly independent if none is a linear combination of the others, so also they are **affinely independent** if none is an affine combination of the others. The set of linear combinations of a set of vectors is their "linear span" and is always a linear subspace; the set of all affine combinations is their "affine span" and is always an affine subspace. For example, the affine span of a set of two points is the line that contains both; the affine span of a set of three non-collinear points is the plane that contains all three. Vectors v_{1},v_{2},..,v_{n} are linearly dependent if scalars
a_{1},a_{2},..,a_{n} exist such that
a_{1}v_{1}+...+a_{n}v_{n}=0 and not all of these scalars are 0. Similarly they are **affinely dependent** if the same is true and also a_{1}+...+a_{n}=0. Such a vector (a_{1},...,a_{n}) is an **affine dependence** among the vectors v_{1},v_{2},..,v_{n}.

The set of all affine transformations forms a group under the operation of composition of functions. That group is called the affine group, and is the semidirect product of *K*^{n} and *GL*(*n*, *k*).

## Example of an affine transformation

The following equation expresses an affine transformation in GF(2) (with "+" representing XOR):

- {a'} = [M]{a} + {v}

*x*

^{7}+

*x*

^{6}+

*x*

^{3}+

*x*= {11001010} in big-endian binary notation = {CA} in big-endian hexadecimal notation, is calculated as follows:

*x*

^{7}+

*x*

^{6}+

*x*

^{5}+

*x*

^{3}+

*x*

^{2}+ 1 = {11101101} = {ED}

See also: affine geometry, homothety, similarity transformation.