Jorge Valle

Jorge Valle

Jorge Valle is a front end developer with a particular passion for, and expertise in, JavaScript and user interfaces. Lately, he's also been diving into machine learning.

The diagonals of a matrix

I couldn't find a good reference online for the many different diagonals of a matrix, so I decided to create one. As time goes on, I will keep adding diagonals that I've missed.

Main diagonal

The main diagonal is the diagonal of a matrix that spans from the upper left corner to the bottom right corner.

It's also referred to as:

  • Principal diagonal
  • Leading diagonal
$$ \begin{matrix} d_{1} & a_{12} & a_{13} & \cdots & a_{1n} \\ a_{21} & d_{2} & a_{23} & \cdots & a_{2n} \\ a_{31} & a_{32} & d_{3} & \cdots & a_{3n} \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & a_{m3} & \cdots & d_{n} \end{matrix} $$
Figure 1: The main diagonal, denoted by $d_{1}$ through $d_{n}$.

Anti-diagonal

The anti-diagonal is the diagonal that spans from the lower left corner to the upper right corner.

Also known as:

  • Counter diagonal
$$ \begin{matrix} a_{11} & a_{12} & a_{13} & a_{14} & c_{1} \\ a_{21} & a_{22} & a_{23} & c_{2} & a_{25} \\ a_{31} & a_{32} & c_{3} & a_{34} & a_{35} \\ \vdots & \vdots & \vdots & \vdots & \vdots \\ c_{n - 1} & \cdots & 0 & 0 & 0 \end{matrix} $$
Figure 2: The anti-diagonal, denoted by $c_{1}$ through $c_{n}$.

Books, patrons and coffee in Caffè San Marco, Trieste