If two matrices have the same dimensions (number of rows and number of columns), they are conformable for addition.
Multiplication of two matrices is defined if and only if the number of columns of the left matrix is the same as the number of rows of the right matrix. That is, if A is an m × n matrix and B is an s × p matrix, then n needs to be equal to s for the matrix product AB to be defined. In this case, we say that A and B are conformable for multiplication (in that sequence).
Since squaring a matrix involves multiplying it by itself (A2 = AA) a matrix must be m × m (that is, it must be a square matrix) to be conformable for squaring. Thus for example only a square matrix can be idempotent.
This page is based on this Wikipedia article Text is available under the CC BY-SA 4.0 license; additional terms may apply. Images, videos and audio are available under their respective licenses.