What is a matrix


Matrices are a fundamental tool in mathematics and many other fields, including engineering, computer science, and physics. A matrix is a rectangular array of numbers, symbols, or expressions arranged in rows and columns. It is denoted by a capital letter, such as A, B, or C, and defined by its size or dimensions, which are given by the number of rows and columns.

For example, a matrix A with m rows and n columns is denoted as A = [a_ij]_m×n, where a_ij represents the element in the i-th row and j-th column. The elements of a matrix can be real numbers, complex numbers, or even functions or polynomials.

A matrix can be classified as a row matrix, column matrix, or square matrix, depending on its dimensions. A row matrix has only one row, a column matrix has only one column, and a square matrix has an equal number of rows and columns.

Matrix operations are fundamental to matrix algebra. The basic operations on matrices are addition, subtraction, multiplication, and inversion.

Addition and Subtraction:

To add or subtract matrices, we simply add or subtract their corresponding elements. Two matrices A and B can be added or subtracted if they have the same dimensions. For example, if A = [1 2; 3 4] and B = [5 6; 7 8], then A + B = [6 8; 10 12] and A – B = [-4 -4; -4 -4].


Matrix multiplication is a bit more complicated than addition and subtraction. If A is an m × n matrix and B is an n × p matrix, then the product of A and B is an m × p matrix C = AB, where the elements of C are given by the formula c_ij = ∑_(k=1)^n a_ik b_kj. That is, we multiply the i-th row of A with the j-th column of B and sum the products.

Matrix multiplication is not commutative, that is, AB is not equal to BA in general. This means that the order of multiplication matters. For example, if A = [1 2; 3 4] and B = [5 6; 7 8], then AB = [19 22; 43 50] and BA is not defined.


A matrix A can be inverted if it is a square matrix and its determinant is not zero. The inverse of A, denoted by A^-1, is such that AA^-1 = A^-1A = I, where I is the identity matrix. The inverse of a matrix can be computed using the formula A^-1 = 1/det(A) adj(A), where det(A) is the determinant of A and adj(A) is the adjugate matrix of A.

Matrix operations have some properties that are important to know for proper manipulation of matrices. For example, addition and multiplication are associative, that is, (A + B) + C = A + (B + C) and (AB)C = A(BC). Addition and multiplication are also distributive, that is, A(B + C) = AB + AC and (A + B)C = AC + BC. The identity matrix is a matrix with ones on the diagonal and zeros elsewhere. It is denoted by I and has the property that AI = IA = A for any matrix A.

In conclusion, matrices are a fundamental tool in mathematics and many other fields. Understanding matrix basics, such as matrix operations, dimensions, and properties, is essential for working with matrices in various applications.