Take for instance this equation:
$$\sum_{i=1}^N C_{ir} \left[\frac{y_i-\sum_{s=1}^n C_{is}a_s}{\sigma_i^2}\right]=0\ ,\forall r$$
How do I transform this into an equation where, instead of summing over all the indices, I can just have multiplication of matrices and vectors?
I know how to do it, but my way seems a bit too simple: I look at the size of the matrices and just see what I need to transpose and what order I need to make the equation work. I'm not sure if this is the correct way and if this will always give the correct result.