Gram matrices and standard-basis dot products.
@[simp]
Dot product of standard basis vectors.
def
Hex.Matrix.gramMatrix
{R : Type u_1}
{n m : Nat}
[Mul R]
[Add R]
[OfNat R 0]
(M : Matrix R n m)
:
Matrix R n n
Gram matrix of the rows of a dense matrix.
Equations
- M.gramMatrix = Hex.Matrix.ofFn fun (i j : Fin n) => (M.row i).dotProduct (M.row j)
Instances For
@[simp]
theorem
Hex.Matrix.col_gramMatrix
{R : Type u_1}
{n m : Nat}
[Mul R]
[Add R]
[OfNat R 0]
(M : Matrix R n m)
(j : Fin n)
:
Column j of the Gram matrix pairs every row of M against row M j.
The Gram matrix is symmetric, so this matches row_gramMatrix.
@[simp]
The Gram matrix of the identity is the identity.