---
tag: 0CP7YY6NAG
kind: definition
name: Square matrix
msc: [15A99]
defines: 0JXZKX526R
uses: [0N1MY1T0W9]
sources:
  - url: https://en.wikipedia.org/wiki/Square_matrix
    locator: lead section
---

## Definition

Let $R$ be a ring and let $n \ge 0$ be an integer.
A *square matrix* of order $n$ over $R$ is an $n \times n$ [[matrix|0VD9ZSWWJG]] over $R$.
Its *main diagonal* is the list of the entries $a_{11}, a_{22}, \dots, a_{nn}$.
The set of square matrices of order $n$ over $R$ is written $M_n(R)$.

## Remarks

The product of two $n \times n$ matrices is again an $n \times n$ matrix, so $M_n(R)$ is a [[ring|0FHVPRAE60]].
The [[trace|0XC1RDBY7A]], the [[determinant|00KDZRW4C0]] and the [[eigenvalues|0BQAA2BK3Q]] are defined for square matrices.
A square matrix represents a linear map from a space to itself.

## Explanations

### L1 human

A square matrix has as many rows as columns, like a $3 \times 3$ table.
Only square matrices can be multiplied by themselves, so only they have powers like $A^2$.
Many important notions, such as the determinant, apply only to square matrices.
