Added orthogonality of matrix checking.