Let A be any m×n matrix, then A² can be found only when
From the definition, solving fully: apply relevant formula, put numbers, compute. Result comes as m = n. Easy verification shows it satisfies condition.
Ref: NCERT Mathematics Class XII — Matrices and Determinants