Learn about the latest tips, tutorials, upcoming events and certifications
![](https://blogs.sas.com/content/iml/files/2014/11/matrixdiag.png)
I was recently asked about how to use the SAS/IML language to efficiently add a constant to every element of a matrix diagonal. Mathematically, the task is to form the matrix sum A + kI, where A is an n x n matrix, k is a scalar value, and I is the