Arithmetical operations in the array are impossible in C#. Using MathDot like algebraic libraries are known, however, it is not allowed in SQLServer CLR. To circumvent, I’ve developed a pure C# function to operate arrays.

Here is how: Gist version: https://gist.github.com/suatatan/86cc779dfbba7403cbb5478de4285fdc