An $n\times m$ matrix is a grid of numbers with $n$ rows and $m$ columns: \[ A=\begin{bmatrix}a_{11}&a_{12}&\dots&a_{1m}\\a_{21}&a_{22}&\dots&a_{2m}\\\vdots&\vdots&&\vdots\\a_{n1}&a_{n2}&\dots&a_{nm}\end{bmatrix}\]
The $(i,j)$ entry of a matrix $A$ is $a_{ij}$, the number in row $i$ and column $j$ of $A$.
Even though the row matrix and the column matrix above have the same entries, they have a different “shape”, or “size”, so we must think of them has being different matrices. Let's give the definitions to make this precise.
Two matrices $A$ and $B$ have the same size if they have the same number of rows, and they have the same number of columns.
If two matrices do not have the same size, we say they have different sizes.
Two matrices $A$ and $B$ are said to be equal if both of the following conditions hold:
When $A$ and $B$ are equal matrices, we write $A=B$. Otherwise, we write $A\ne B$.