In mathematics, G_{2} is the name of three simple Lie groups (a complex form, a compact real form and a split real form), their Lie algebras as well as some algebraic groups. They are the smallest of the five exceptional simple Lie groups. G_{2} has rank 2 and dimension 14. It has two fundamental representations, with dimension 7 and 14.
The compact form of G_{2} can be described as the automorphism group of the octonion algebra or, equivalently, as the subgroup of SO(7) that preserves any chosen particular vector in its 8dimensional real spinor representation (a spin representation).
The Lie algebra , being the smallest exceptional simple Lie algebra, was the first of these to be discovered in the attempt to classify simple Lie algebras. On May 23, 1887, Wilhelm Killing wrote a letter to Friedrich Engel saying that he had found a 14dimensional simple Lie algebra, which we now call .^{[1]}
In 1893, Élie Cartan published a note describing an open set in equipped with a 2dimensional distributionthat is, a smoothly varying field of 2dimensional subspaces of the tangent spacefor which the Lie algebra appears as the infinitesimal symmetries.^{[2]} In the same year, in the same journal, Engel noticed the same thing. Later it was discovered that the 2dimensional distribution is closely related to a ball rolling on another ball. The space of configurations of the rolling ball is 5dimensional, with a 2dimensional distribution that describes motions of the ball where it rolls without slipping or twisting.^{[3]}^{[4]}
In 1900, Engel discovered that a generic antisymmetric trilinear form (or 3form) on a 7dimensional complex vector space is preserved by a group isomorphic to the complex form of G_{2}.^{[5]}
In 1908 Cartan mentioned that the automorphism group of the octonions is a 14dimensional simple Lie group.^{[6]} In 1914 he stated that this is the compact real form of G_{2}.^{[7]}
In older books and papers, G_{2} is sometimes denoted by E_{2}.
There are 3 simple real Lie algebras associated with this root system:
The Dynkin diagram for G_{2} is given by .
Its Cartan matrix is:
The 12 vector root system of G_{2} in 2 dimensions. 
The A_{2}Coxeter plane projection of the 12 vertices of the cuboctahedron contain the same 2D vector arrangement. 
Graph of G2 as a subgroup of F4 and E8 projected into the Coxeter plane 
Although they span a 2dimensional space, as drawn, it is much more symmetric to consider them as vectors in a 2dimensional subspace of a threedimensional space.


One set of simple roots, for is:
Its Weyl/Coxeter group is the dihedral group, of order 12. It has minimal faithful degree .
G_{2} is one of the possible special groups that can appear as the holonomy group of a Riemannian metric. The manifolds of G_{2} holonomy are also called G_{2}manifolds.
G_{2} is the automorphism group of the following two polynomials in 7 noncommutative variables.
which comes from the octonion algebra. The variables must be noncommutative otherwise the second polynomial would be identically zero.
Adding a representation of the 14 generators with coefficients A, ..., N gives the matrix:
It is exactly the Lie algebra of the group
The characters of finitedimensional representations of the real and complex Lie algebras and Lie groups are all given by the Weyl character formula. The dimensions of the smallest irreducible representations are (sequence in the OEIS):
The 14dimensional representation is the adjoint representation, and the 7dimensional one is action of G_{2} on the imaginary octonions.
There are two nonisomorphic irreducible representations of dimensions 77, 2079, 4928, 28652, etc. The fundamental representations are those with dimensions 14 and 7 (corresponding to the two nodes in the Dynkin diagram in the order such that the triple arrow points from the first to the second).
Vogan (1994) described the (infinitedimensional) unitary irreducible representations of the split real form of G_{2}.
The group G_{2}(q) is the points of the algebraic group G_{2} over the finite field F_{q}. These finite groups were first introduced by Leonard Eugene Dickson in Dickson (1901) for odd q and Dickson (1905) for even q. The order of G_{2}(q) is . When , the group is simple, and when , it has a simple subgroup of index 2 isomorphic to ^{2}A_{2}(3^{2}), and is the automorphism group of a maximal order of the octonions. The Janko group J_{1} was first constructed as a subgroup of G_{2}(11). Ree (1960) introduced twisted Ree groups ^{2}G_{2}(q) of order for , an odd power of 3.