# Solving simultaneous systems of linear equations

I have several systems of linear equations in matrix form, and I would like to find the $\vec{x}$ that simultaneously solves them: $$A_1\vec{x} = b_1$$ $$\vdots$$ $$A_n\vec{x} = b_n$$ Is there a quick/neat way to do this? That is, something like: $$\text{LinearSolve}[A_1,b_1,\ldots,A_n,b_n]$$ If not, I will take a messy one.

• Stack the matrices and right hand sides and do LinearSolve[Astack,bstack]. Both of these can be done with Join. Nov 20 '14 at 23:34
• In other words, use LinearSolve[Join[A1,...,An], Join[b1,...,bn]]. Nov 20 '14 at 23:36

Since nobody has posted a "messy" solution yet, let me: if the matrices are in one list alist = {a1,a2,...,an} and the rhs' are in another, blist = {b1,b2,...,bn} then
Clear[x];