In Maths, a matrix is defined as a rectangular array of numbers, which are arranged in rows and columns. Each number in the array is called the element or the entity of a matrix. The array of numbers arranged horizontally are called rows, and the array of numbers arranged vertically are called columns. If a matrix has m rows and n columns, the order of the matrix is given by m x n. Depending on the order and the elements of a matrix, the matrix can be classified into different types, such as square matrix, diagonal matrix, zero matrix, identity matrix, and so on.