# What's a good method to solve for scalars in a vector equality?

For example, what's a good way to solve for $c_1$, $c_2$ and $c_3$ in:

$$c_1(1,-1,0) + c_2(3,2,1) + c_3(0,1,4) = (-1,1,19)$$

-
This is a basic problem in linear algebra. The key phrase here is Gaussian Elimination, which you can read about on Wikipedia, for example. – NKS Jan 9 '12 at 4:21

What you really have is a system of linear equations. You can express this in the form $Ax=b$ for matrix $A$ and vectors $x,b$.

In the case of your example: $$\left(\begin{matrix} 1 & 3 &0 \\ -1&2&1\\ 0&1&4\\ \end{matrix} \right) \left(\begin{matrix}c_1\\ c_2\\ c_3\end{matrix}\right) = \left(\begin{matrix}-1\\1\\19\end{matrix}\right)$$

You can solve this by Gaussian Elimination. A special case is when $A$ is invertible we have $x=A^{-1}b$.

-

Solve it like you would any system of equations. This is a system of three equations with three unknowns:

$c_1 + 3c_2 = -1$

$-c_1 + 2c_2 + c_3 = 1$

$c_2 + 4c_3 = 19$

There are many ways to go about solving this type of system, including substitution and elimination techniques.

-
Thanks, I see it now. – Louis Jan 9 '12 at 4:21