Two matrices and are said to be equal iff
for all . Therefore,
while
More things to try:
Weisstein, Eric W. "Matrix Equality." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/MatrixEquality.html