![Vectorizing the construction of a structured matrix](https://blogs.sas.com/content/iml/files/2013/11/vectorizematrix.png)
In using a vector-matrix language such as SAS/IML, MATLAB, or R, one of the challenges for programmers is learning how to vectorize computations. Often it is not intuitive how to program a computation so that you avoid looping over the rows and columns of a matrix. However, there are a