frobenius


function frobenius(A:RealMatrixLike, B:RealMatrixLike) -> RealScalarLike

Matrix-matrix Frobenius product.

  • A Matrix A.
  • B Matrix B.

Returns Result \langle A, B \rangle_\mathrm{F} = \mathrm{Tr}(A^\top B) = \sum_{ij} A_{ij} B_{ij} as a scalar.

function frobenius(A:RealMatrixLike) -> RealScalarLike

Matrix Frobenius product.

  • A Matrix A.

Returns Result \langle A, A \rangle_\mathrm{F} = \mathrm{Tr}(A^\top A) = \sum_{ij} A_{ij}^2 as a scalar.