Matrix Properties / Features

  1. Diagonals. Being a grid of rows and columns, a matrix consists of multiple diagonals, but one diagonal has a special significance: the main diagonal.

    The main diagonal of the matrix $A_{n \times m} = [a_{i,j}]$ is the array of all elements of the form: $a_{i,i}$, where $1 \le i \le \min(n, m)$. That is,
    $\text{diag}(A) = [a_{1,1}, a_{2,2}, a_{3,3}, \dots, a_{\min(n, m), \min(n, m)}]$.
    Examples:

    Matrix $\begin{bmatrix} \boldsymbol{\color{green}{1}} & 2 & 3 \\ 4 & \boldsymbol{\color{green}{5}} & 6 \end{bmatrix}$ $\begin{bmatrix} \color{green}{\bf \text{Bla}} \end{bmatrix}$ $\begin{bmatrix} \boldsymbol{\color{green}{a}} & b \\ c & \boldsymbol{\color{green}{d}} \\ e & f \\ g & h \\ i & j \end{bmatrix}$ $\begin{bmatrix} \boldsymbol{\color{green}{65.7}} & 62.4 & 73.8 & 76.6 & 75.0 \end{bmatrix}$ $\begin{bmatrix} \boldsymbol{\color{green}{1}} & 0 & 0 & 0 \\ 0 & \boldsymbol{\color{green}{1}} & 0 & 0 \\ 0 & 0 & \boldsymbol{\color{green}{1}} & 0 \\ 0 & 0 & 0 & \boldsymbol{\color{green}{1}} \end{bmatrix}$
    Name $A_{2 \times 3}$ $S_{1 \times 1}$ $L_{5 \times 2}$ $T_{1 \times 5}$ $I_{4 \times 4} = I_4$
    Main Diag $\text{diag}(A) = [1, 5]$ $\text{diag}(S) = [\text{Bla}]$ $\text{diag}(L) = [a, d]$ $\text{diag}(T) = [65.7]$ $\text{diag}(I) = [1, 1, 1, 1]$