# Matrix

A matrix is a grid used to store or display data in a structured format. It is often used synonymously with a table, which contains horizontal rows and vertical columns.

While the terms "matrix" and "table" can be used interchangeably, matrixes (or matrices) are considered more flexible than tables. For example, tables generally have a fixed number of rows and columns, while the size of a matrix may change dynamically. The term "matrix" may also be used to refer to a table that has groups of columns within a single row.

In computing, a matrix may be used to store a group of related data. For example, some programming languages support matrixes as a data type that offers more flexibility than a static array. By storing values in a matrix rather than as individual variables, a program can access and perform operations on the data more efficiently.

In mathematics, matrixes are used to display related numbers. Math matrixes are usually presented as a list of numbers within square brackets. A matrix that only contains one row is called a row vector, while a matrix that contains a single column is called a column vector. A matrix that contains the same number of rows as columns (for example, a 4x4 matrix) is called a square matrix.

**NOTE:** While the term "matrix" has technical meanings in both computing and mathematics, it is also used in everyday speech to describe structured data. For example, a comparison chart may also be called a comparison matrix because it contains a list of values in a grid format.