This function computes the gradient of the orthogonality defect for a matrix A, The orthogonality defect is defined as the sum of the squared off-diagonal elements of t(A) %*% A.

gradient_invariant_orthogonality_defect(A)

Arguments

A

A numeric matrix.

Value

A matrix representing the gradient of the orthogonality defect with respect to Ap.