A matrix is a rectangular array of numbers or elements, arranged in rows and columns, enclosed in square brackets.