Definition and Types
Definition of Matrices
A matrix is a rectangular array of numbers, symbols, or expressions arranged in rows and columns. In general, a matrix with m rows and n columns is called an matrix.
General form of a matrix A:
Where represents the element in the i-th row and j-th column.
In PHP matrices can be written like n-dimensional arrays:
Types of Matrices
Row matrix:
A matrix with only one row .
Example:
Column matrix:
A matrix with only one column .
Example:
Square matrix:
A matrix with an equal number of rows and columns .
Example:
Diagonal matrix:
A square matrix where all elements outside the main diagonal are zero.
Example:
Identity matrix:
A square matrix with 1s on the main diagonal and 0s elsewhere, usually denoted by .
Example:
Zero matrix:
A matrix where all elements are zero, usually denoted by 0.
Example:
Symmetric matrix:
A square matrix that is equal to its transpose .
Example:
Skew-symmetric matrix:
A square matrix A where .
Example:
Upper triangular matrix:
A square matrix where all elements below the main diagonal are zero.
Example:
Lower triangular matrix:
A square matrix where all elements above the main diagonal are zero.
Example:
Understanding these types of matrices is crucial for working with more advanced concepts in linear algebra, such as matrix operations, determinants, and eigenvalues
Last updated