Real case The general linear group \operatorname{GL}(n,\R) over the field of
real numbers is a real
Lie group of dimension n^2. To see this, note that the set of all n\times n real matrices, M_n(\R), forms a
real vector space of dimension n^2. The subset \operatorname{GL}(n,\R) consists of those matrices whose
determinant is non-zero. The determinant is a
polynomial map, and hence \operatorname{GL}(n,\R) is an
open affine subvariety of M_n(\R) (a
non-empty open subset of M_n(\R) in the
Zariski topology), and therefore a
smooth manifold of the same dimension. The
Lie algebra of \operatorname{GL}(n,\R), denoted \mathfrak{gl}_n, consists of all n\times n real matrices with the
commutator serving as the Lie bracket. As a manifold, \operatorname{GL}(n,\R) is not
connected but rather has two
connected components: the matrices with positive determinant and the ones with negative determinant. The
identity component, denoted by \operatorname{GL}^+(n,\R), consists of the real n\times n matrices with positive determinant. This is also a Lie group of dimension n^2; it has the same Lie algebra as \operatorname{GL}(n,\R). The
polar decomposition, which is unique for invertible matrices, shows that there is a homeomorphism between \operatorname{GL}(n,\R) and the Cartesian product of \operatorname{O}(n) with the set of positive-definite symmetric matrices. Similarly, it shows that there is a homeomorphism between \operatorname{GL}^+(n,\R) and the Cartesian product of \operatorname{SO}(n) with the set of positive-definite symmetric matrices. Because the latter is contractible, the
fundamental group of \operatorname{GL}^+(n,\R) is isomorphic to that of \operatorname{SO}(n). The homeomorphism also shows that the group \operatorname{GL}(n,\R) is
noncompact. “The”
maximal compact subgroup of \operatorname{GL}(n,\R) is the
orthogonal group \operatorname{O}(n), while "the" maximal compact subgroup of \operatorname{GL}^+(n,\R) is the
special orthogonal group \operatorname{SO}(n). As for \operatorname{SO}(n), the group \operatorname{GL}^+(n,\R) is not
simply connected (except when n=1, but rather has a
fundamental group isomorphic to \Z for n=2 or \Z_2 for n>2.
Complex case The general linear group over the field of
complex numbers, \operatorname{GL}(n,\C), is a
complex Lie group of complex dimension n^2. As a real Lie group (through realification) it has dimension 2n^2. The set of all real matrices forms a real Lie subgroup. These correspond to the inclusions :\operatorname{GL}(n,\R), which have real dimensions n^2, 2n^2, and (2n)^2=4n^2. Complex n-dimensional matrices can be characterized as real 2n-dimensional matrices that preserve a
linear complex structure; that is, matrices that commute with a matrix J such that J^2=-I, where J corresponds to multiplying by the imaginary unit i. The
Lie algebra corresponding to \operatorname{GL}(n,\C) consists of all n\times n complex matrices with the
commutator serving as the Lie bracket. Unlike the real case, \operatorname{GL}(n,\C) is
connected. This follows, in part, since the multiplicative group of complex numbers \C^\times is connected. The group manifold \operatorname{GL}(n,\C) is not compact; rather its
maximal compact subgroup is the
unitary group \operatorname{U}(n). As for \operatorname{U}(n), the group manifold \operatorname{GL}(n,\C) is not
simply connected but has a
fundamental group isomorphic to \Z. == Over finite fields ==