Q-algebras provide a non-boolean logical model and have been used to study quantum measurement, interference phenomena in quantum physics and the nature of the quantum probabilities. Each Q-algebra can be represented on a pre-Hilbert space, thus resulting in the standard model of quantum theory, but the representations considered by the author in recent papers involve unnecessarily large pre-Hilbert spaces (with an infinite dimension in all non-commutative cases even if the Q-algebra itself has a finite dimension). In the present paper, an "optimal" representation is constructed. It uses a pre-Hilbert space of minimum dimension, and is unique in a certain sense. A Q-algebra of finite dimension becomes isomorphic to a finite direct sum of matrix algebras.