The location of the diagonal elements in the half-vectorization of a matrix

178 Views Asked by At

I'm trying to find a formula for the index of the diagonal entry when organized in a vector given by the half-vectorization operator.

Assume that we have a symmetric matrix $$ M = \begin{bmatrix}m_{11}&m_{12}& \dots& m_{1n}\\ m_{21} &m_{22}& \dots & m_{2n} \\ \vdots & \vdots& \ddots& \vdots\\ m_{n1} & m_{n2} & \dots &m_{nn}\end{bmatrix} $$

Then the half-vectorization of $M$ is a vector of dimension $n(n+1)/2$ and is given by $$ V = \text{vech}[M] = \begin{bmatrix}m_{11}\\m_{21}\\ \vdots\\ m_{n1}\\m_{22}\\m_{23} \\\vdots\\ m_{n2}\\ m_{33} \\ \vdots \\\vdots\\ m_{nn} \end{bmatrix} $$

The question is what is the formula to use to find the location of the $i$th diagonal entry of $M$ in the vector $V$.

It is easy to see the following pattern in the locations of the diagonals $$ 1,\; n+1,\; 2n,\; 3n-2,\; 4n-5,\; 5n-9,\; 6n-14, ...\\ $$

1

There are 1 best solutions below

1
On

The formula is $$ (i-1)n +1 -\frac{(i-2)(i-1)}{2} $$