Human colour vision is the result of a complex process involving topics ranging from physics of light to perception. Whereas the diversity of light entering the eye in principle span an infinite-dimensional vector space in terms of the spectral power distributions, the space of human colour perceptions is three dimensional. One important consequence of this is that a variety of colours can be visually matched by a mixture of only three adequately chosen reference lights. It has been observed that there exists one particular set of monochromatic reference lights that, according to a certain definition, is optimal for producing colour matches. These reference lights are commonly denoted prime colours. In the present paper, we intend to rigorously show that the existence of prime colours is not particular to the human visual system as sometimes stated, but rather an algebraic consequence of the manner in which a kind of colorimetric functions called colour-matching functions are defined and transformed. The solution is based on maximisation of a determinant determining the gamut size of the colour space spanned by the prime colours. Cramer’s rule for solving a set of linear equations is an essential part of the proof. By means of examples, it is shown that mathematically the optimal set of reference lights is not unique in general, and that the existence of a maximum determinant is not a necessary condition for the existence of prime colours.