A symmetric matrix with zero main diagonal, meaning a matrix $S = S^T$ with $S_{i,i}=0,\ \forall i =1,..,n$ is givne in the following form
\begin{displaymath}
S = \begin{pmatrix}
0 & s_{1,0}& s_{2,0}&\ldots& s_{n-1,0}\\
s_{1,0}& 0 & s_{2,1}&\ldots& s_{n-1,1}\\
s_{2,0}& s_{2,1}& 0 &\ldots& s_{n-1,2}\\
\vdots&\vdots&\vdots&\ddots&\vdots\\
s_{n-1,0}& s_{n-1,1}& s_{n-1,2}&\ldots& 0
\end{pmatrix}
\end{displaymath}
Therefore its sufficient to store only the lower triangular part, for memory efficiency and some further alrogithmic shortcuts (sometime they are more expencife) the symmetric matrix $S$ is stored in packed form, meanin in a vector of the length $\frac{n(n-1)}{2}$. We use (like for matrices) a column-major order of elements and define the $\vecl:\Sym(n)\to\mathbb{R}^{n(n-1)/2}$ opperator defined as