Matrices provide the compact mathematical structure used to represent and manipulate tabular data at scale.
A matrix organises numerical entries into an indexed two-dimensional rectangular grid.
The dimensions are universally specified as m rows by n columns, where m and n are positive integers.
An individual entry inside matrix A is denoted by a lowercase letter with subscripts i and j for its row and column.
A matrix with an equal count of rows and columns is called a square matrix, such as three by three.
A matrix containing only a single column is equivalent to a column vector, while one row forms a row vector.
In statistical computing, the central data table is commonly arranged as an m-by-n design matrix.
Each row in the design matrix represents an individual observed sample or experimental trial.
Each column represents a distinct numeric variable or measured property recorded across all samples.
Matrices of identical dimensions can be added or subtracted together element by element.
Multiplying a matrix by a scalar scales every internal entry by that constant, preserving its grid dimensions.
A common beginner trap is confusing the row-by-column dimension order, accidentally reading columns before rows.
Transposing this convention leads to dimension mismatch errors when feeding matrices into mathematical algorithms.
Special configurations include diagonal matrices, where all entries outside the main diagonal are zero.
Viewing tabular datasets as matrices allows algorithms to execute operations across millions of values simultaneously.