In mathematics, the **affine group** or **general affine group** of any affine space is the group of all invertible affine transformations from the space into itself. In the case of a Euclidean space (where the associated field of scalars is the real numbers), the affine group consists of those functions from the space to itself such that the image of every line is a line.

Over any field, the affine group may be viewed as a matrix group in a natural way. If the associated field of scalars the real or complex field, then the affine group is a Lie group.

Concretely, given a vector space V, it has an underlying affine space A obtained by "forgetting" the origin, with V acting by translations, and the affine group of A can be described concretely as the semidirect product of V by GL(*V*), the general linear group of V:

The action of GL(*V*) on V is the natural one (linear transformations are automorphisms), so this defines a semidirect product.

In terms of matrices, one writes:

where here the natural action of GL(*n*, *K*) on K^{n} is matrix multiplication of a vector.

Given the affine group of an affine space A, the stabilizer of a point p is isomorphic to the general linear group of the same dimension (so the stabilizer of a point in Aff(2, **R**) is isomorphic to GL(2, **R**)); formally, it is the general linear group of the vector space (*A*, *p*): recall that if one fixes a point, an affine space becomes a vector space.

All these subgroups are conjugate, where conjugation is given by translation from p to q (which is uniquely defined), however, no particular subgroup is a natural choice, since no point is special – this corresponds to the multiple choices of transverse subgroup, or splitting of the short exact sequence

In the case that the affine group was constructed by *starting* with a vector space, the subgroup that stabilizes the origin (of the vector space) is the original GL(*V*).

Representing the affine group as a semidirect product of V by GL(*V*), then by construction of the semidirect product, the elements are pairs (*v*, *M*), where v is a vector in V and M is a linear transform in GL(*V*), and multiplication is given by

This can be represented as the (*n* + 1) × (*n* + 1) block matrix

where M is an *n* × *n* matrix over K, v an *n* × 1 column vector, 0 is a 1 × *n* row of zeros, and 1 is the 1 × 1 identity block matrix.

Formally, Aff(*V*) is naturally isomorphic to a subgroup of GL(*V* ⊕ *K*), with V embedded as the affine plane {(*v*, 1) | *v* ∈ *V*}, namely the stabilizer of this affine plane; the above matrix formulation is the (transpose of) the realization of this, with the *n* × *n* and 1 × 1) blocks corresponding to the direct sum decomposition *V* ⊕ *K*.

A similar representation is any (*n* + 1) × (*n* + 1) matrix in which the entries in each column sum to 1.^{[1]} The similarity P for passing from the above kind to this kind is the (*n* + 1) × (*n* + 1) identity matrix with the bottom row replaced by a row of all ones.

Each of these two classes of matrices is closed under matrix multiplication.

The simplest paradigm may well be the case *n* = 1, that is, the upper triangular 2 × 2 matrices representing the affine group in one dimension. It is a two-parameter non-Abelian Lie group, so with merely two generators (Lie algebra elements), A and B, such that [*A*, *B*] = *B*, where

so that

Aff(**F**_{p}) has order *p*(*p* − 1). Since

we know Aff(**F**_{p}) has p conjugacy classes, namely

Then we know that Aff(**F**_{p}) has p irreducible representations. By above paragraph (§ Matrix representation), there exist *p* − 1 one-dimensional representations, decided by the homomorphism

for *k* = 1, 2,… *p* − 1, where

and *i*^{2} = −1, *a* = *g ^{j}*, g is a generator of the group

hence *χ _{p}* =

The elements of can take a simple form on a well-chosen affine coordinate system. More precisely, given an affine transformation of an affine plane over the reals, an affine coordinate system exists on which it has one of the following forms, where a, b, and t are real numbers (the given conditions insure that transformations are invertible, but not for making the classes distinct; for example, the identity belongs to all the classes).

Case 1 corresponds to translations.

Case 2 corresponds to scalings that may differ in two different directions. When working with a Euclidean plane these directions need not be perpendicular, since the coordinate axes need not be perpendicular.

Case 3 corresponds to a scaling in one direction and a translation in another one.

Case 4 corresponds to a shear mapping combined with a dilation.

Case 5 corresponds to a shear mapping combined with a dilation.

Case 6 corresponds to similarities when the coordinate axes are perpendicular.

The affine transformations without any fixed point belong to cases 1, 3, and 5. The transformations that do not preserve the orientation of the plane belong to cases 2 (with *ab* < 0) or 3 (with *a* < 0).

The proof may be done by first remarking that if an affine transformation has no fixed point, then the matrix of the associated linear map has an eigenvalue equal to one, and then using the Jordan normal form theorem for real matrices.

Given any subgroup *G* < GL(*V*) of the general linear group, one can produce an affine group, sometimes denoted Aff(*G*), analogously as Aff(*G*) := *V* ⋊ *G*.

More generally and abstractly, given any group G and a representation of G on a vector space V, one gets^{[note 1]} an associated affine group *V* ⋊_{ρ} *G*: one can say that the affine group obtained is "a group extension by a vector representation", and, as above, one has the short exact sequence

The subset of all invertible affine transformations that preserve a fixed volume form up to sign is called the *special affine group*. (The transformations themselves are sometimes called *equiaffinities*.) This group is the affine analogue of the special linear group. In terms of the semi-direct product, the special affine group consists of all pairs (*M*, *v*) with , that is, the affine transformations

where M is a linear transformation of whose determinant has absolute value 1 and v is any fixed translation vector.

The subgroup of the special affine group consisting of those transformations whose linear part has determinant 1 is the group of orientation- and volume-preserving maps. Algebraically, this group is a semidirect product of the special linear group of with the translations. It is generated by the shear mappings.

Presuming knowledge of projectivity and the projective group of projective geometry, the affine group can be easily specified. For example, Günter Ewald wrote:^{[4]}

- The set of all projective collineations of
*P*^{n}is a group which we may call the**projective group**of*P*^{n}. If we proceed from*P*^{n}to the affine space*A*^{n}by declaring a hyperplane ω to be a hyperplane at infinity, we obtain the**affine group**of*A*^{n}as the subgroup of consisting of all elements of that leave ω fixed.

When the affine space A is a Euclidean space (over the field of real numbers), the group of distance-preserving maps (*isometries*) of A is a subgroup of the affine group. Algebraically, this group is a semidirect product of the orthogonal group of with the translations. Geometrically, it is the subgroup of the affine group generated by the orthogonal reflections.

Main article: Poincaré group |

The Poincaré group is the affine group of the Lorentz group O(1,3):

This example is very important in relativity.