Matrix Representation of Inner Products