The set of class functions of a group ''{{mvar|G''}} with values in a field ''{{mvar|K''}} form a ''{{mvar|K''}}-[[vector space]]. If ''{{mvar|G''}} is finite and the [[characteristic (algebra)|characteristic]] of the field does not divide the order of ''{{mvar|G''}}, then there is an [[inner product]] defined on this space defined by <math>\langle \phi , \psi \rangle = \frac{1}{|G|} \sum_{g \in G} \phi(g) \overline{\psi(g^{-1})},</math> where {{math|{{!}}''G''|{{!}}}} denotes the order of ''{{mvar|G''}} and the overbar denotes conjugation in the field {{mvar|K}}. The set of [[Character theory|irreducible characterscharacter]]s of ''{{mvar|G''}} forms an [[orthogonal basis]],. andFurther, if ''{{mvar|K''}} is a [[splitting field]] for ''{{mvar|G'', }}{{--}}for instance, if ''{{mvar|K''}} is [[algebraically closed]], then the irreducible characters form an [[orthonormal basis]].
InWhen the{{mvar|G}} case ofis a [[compact group]] and {{math|''K'' {{=}} '''C'''}} is the field of [[complex number]]s, the notion of [[Haar measure]] allowscan onebe applied to replace the finite sum above with an integral: <math>\langle \phi, \psi \rangle = \int_G \phi(t) \overline{\psi(t^{-1})}\, dt.</math>
When ''{{mvar|K''}} is the real numbers or the complex numbers, the inner product is a [[degenerate form|non-degenerate]] [[Hermitian form|Hermitian]] [[bilinear form]].