# Determine whether a matrix is a linear combination of a given set of matrices

Is there any algorithm to determine whether a matrix is a linear combination of another set of matrices? For example, I want to find whether the matrix [1 0] can be written as a linear combination of the matrices [1 2] and [1 1].

-
I think I'll need to represent the linear combination of these matrices as a system of linear equations, and then convert the system of equations to row echelon form - how can I write this problem as a system of linear equations? –  Anderson Green Dec 4 '12 at 5:27

Solve the system of equations $\begin{pmatrix} a+b \\ 2a +b \end{pmatrix}=\begin{pmatrix} 1 \\ 0 \end{pmatrix}$. If there is a solution, then it can be written as a linear combination. If there is no solution, then it can't be.
In general, given a matrix $A$ and a matrix $B$ and a matrix $C$, $C$ is a linear combination of $A$ and $B$ if there exists $x,y \in \mathbb{R}$ so that $xA+yB=C$. So solve $(xa_{ij}+ya_{ij})=(c_{ij})$. –  Jebruho Dec 4 '12 at 5:46
$xa_{ij}$ is $x$ times the $i,j$ entry of $A$. $ya_{ij}$ is defined similarly. –  Jebruho Dec 11 '12 at 20:12