Given two matrices A and B as shown below:
A = [aij]
B = [bij]
A is equal to B if and only if they have the same size and aij = bij, for 1 ≤ i ≤ m and 1 ≤ j ≤ n
i is the row index
j is the column index
m is the total number of rows
n is the total number of columns