isSymmetric method

bool isSymmetric()

A symmetric matrix is a square matrix that is equal to its transpose. Because equal matrices have equal dimensions, only square matrices can be symmetric.

Implementation

bool isSymmetric() {
  if (isSquareMatrix) {
    return this == transpose();
  }

  return false;
}