Do we have a function to get matrix norms in Math?

No

Except the sum of `columns_dot_self`

yields the squared Frobenius norm.

For a symmetric matrix you can get the eigenvalues in Stan, the largest of which is the 2-norm of that matrix. There are more efficient ways though for getting the 2-norm.

In general it’s too expensive to get 2-norm unless it’s a byproduct of algorithms involving svd, or in your case eigen problem. As Wllkinson once said, in practice only nice norms like inf-norm are useful numerically. I tend to agree with him.

Some background. I’m planning to implement the matrix exponential algorithm by Al-Mohy and its refinement, which involves several 1-norm/inf-norm calculations. It seems I’ll need to do something like this first.