# Nakafa Framework: LLM
URL: /en/subject/high-school/11/mathematics/matrix/matrix-types
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/subject/high-school/11/mathematics/matrix/matrix-types/en.mdx
Output docs content for large language models.
---
export const metadata = {
  title: "Matrix Types",
  description: "Discover all matrix types: row, column, square, triangular, diagonal, identity, zero, and symmetric matrices. Complete guide with definitions and examples.",
  authors: [{ name: "Nabil Akbarazzima Fatih" }],
  date: "06/05/2025",
  subject: "Matrix",
};
## Row Matrix
A row matrix is a matrix that consists of only one row.
The order of a row matrix is , where  is the number of columns.
Its general form is:
Example:
Matrix  is a row matrix of order .
## Column Matrix
A column matrix is a matrix that consists of only one column.
The order of a column matrix is , where  is the number of rows.
Its general form is:
Example:
Matrix  is a column matrix of order .
## Square Matrix
A square matrix is a matrix that has the same number of rows and columns.
If the number of rows = number of columns = , then the matrix is of order .
Its general form is:
In a square matrix, there are:
1. **Main Diagonal** (or Principal Diagonal):
   The elements  (i.e.,  where ).
2. **Anti-diagonal** (or Counter-diagonal):
   The elements  (i.e.,  where ).
Example:
Matrix  is a square matrix of order . Its main diagonal elements are . Its anti-diagonal elements are .
## Rectangular Matrix
A rectangular matrix is a matrix where the number of rows and columns are not equal ().
General example:
Matrix  above has 2 rows and 3 columns, so its order is . Since the number of rows is not equal to the number of columns (), matrix  is a rectangular matrix.
Rectangular matrices can be further distinguished into horizontal matrices and vertical matrices.
### Horizontal Matrix
A horizontal matrix is a rectangular matrix with more columns than rows ().
Example:
Matrix  is a horizontal matrix of order .
### Vertical Matrix
A vertical matrix is a rectangular matrix with more rows than columns ().
Example:
Matrix  is a vertical matrix of order .
## Triangular Matrix
A triangular matrix is a square matrix where the elements below or above the main diagonal are zero.
### Upper Triangular Matrix
An upper triangular matrix is a square matrix where all elements below the main diagonal are zero.
This means  for every .
Example:
### Lower Triangular Matrix
A lower triangular matrix is a square matrix where all elements above the main diagonal are zero.
This means  for every .
Example:
## Diagonal Matrix
A diagonal matrix is a square matrix where all elements outside the main diagonal are zero.
This means  for every . Elements on the main diagonal can be zero or non-zero.
Example:
Matrix  is a diagonal matrix of order .
## Identity Matrix
An identity matrix (denoted by  or ) is a diagonal matrix where all elements on the main diagonal are 1.
Example:
  
  
The identity matrix acts as the neutral element in matrix multiplication.
## Zero Matrix
A zero matrix (denoted by  or ) is a matrix where all elements are zero.
Example:
  
  
## Symmetric Matrix
A symmetric matrix is a square matrix that is equal to its transpose ().
This means the element  for all  and . Its elements are symmetric with respect to the main diagonal.
Example:
In matrix :
- 
- 
-