In mathematics, especially in geometry and group theory, a lattice in $\mathbb{R}^n$ is a subgroup of $\mathbb{R}^n$ which is isomorphic to $\mathbb{Z}^n$, and which spans the real vector space $\mathbb{R}^n$. In other words, for any basis of $\mathbb{R}^n$, the subgroup of all linear combinations with integer coefficients forms a lattice. A lattice may be viewed as a regular tiling of a space by a primitive cell.
More generally, a lattice $\Gamma$ in a Lie group $G$ is a discrete subgroup, such that the quotient $G/\Gamma$ is of finite measure, for the measure on it inherited from Haar measure on $G$ (left-invariant, or right-invariant - the definition is independent of that choice). That will certainly be the case when $G/\Gamma$ is compact, but that sufficient condition is not necessary, as is shown by the case of the modular group in $SL_2(\mathbb{R})$, which is a lattice but where the quotient isn't compact (it has cusps). There are general results stating the existence of lattices in Lie groups.
A lattice is said to be uniform or cocompact if $G/\Gamma$ is compact; otherwise the lattice is called non-uniform