Ways to solve system of linear equations

I have a system that looks like this:

V_0 = Sum_i=1,3 C_i x V_i

V are vectors (one dimensional arrays).
C are coefficients (scalars).
These vectors are long, 40-50 entries per. So there are a large number of equations for 3 unknowns.

So I have four input vectors, and I want to solve for the three coefficients. Which ROOT function would be best to use for this?

This system can also be represtented as an overdetermined linear system:

A[50x3] x[3x1] = b[50x1]

However I am not sure what function is best to use for this type of system. I would like to be able to use error propagation as well.


You can use the functions of the matrix library to solve system of linear equations. Several type of matrix decompositions are available in ROOT, see the matrix package documentation, especially the paragraph on matrix decomposition

root.cern.ch/download/doc/ROOTUs … lgebra.pdf

Best Regards