# How do I find a Solution Common to Many Linear Systems?

So I have the following equation:

$$\sum_{n=1}^{N} S_n f_n(x,y,z) = g(x,y,z)$$

And then for every particular set $\xi$ of $N$ random $(x,y,z)$ points, $\forall x,y,z \in {\mathbb R}$, I can construct an ${\bf F}_{N \times N}(\xi)$ matrix and a ${\bf g}(\xi)$ column vector and then have a system of equations represented by the matrix equation of the form ${\bf F}(\xi) \cdot {\bf s} = {\bf g}(\xi)$

So my question is this: Is there a way to find the solution column vector ${\bf s}$ which solves ${\bf F}(\xi) \cdot {\bf s} = {\bf g}(\xi)$ for multiple $\xi$ sets simultaneously?

• This means the same $s$ solves all those systems, or? – mvw Nov 7 '15 at 19:41
• @mvw Yes, a single ${\bf s}$ that solves all systems at once. Notice that ${\bf s}$ isn't a function of $\xi$. – urquiza Nov 7 '15 at 20:37
• if your coefficients are exact elimination should work, if not you might want to solve $A^tA s = A^tb$. – mvw Nov 7 '15 at 20:40
• And by that you mean the $A$ and $b$ are created the way you outlined below? – urquiza Nov 7 '15 at 20:42
• Yes, that large system of $kn$ equations in $n$ unknowns. See en.wikipedia.org/wiki/… – mvw Nov 7 '15 at 20:44

## 1 Answer

Just stack the matrices and vectors top to bottom: $$\left( \begin{array}{c} F_{(1)}\\ \vdots\\ F_{(k)} \end{array} \right) s= \left( \begin{array}{c} g_{(1)}\\ \vdots\\ g_{(k)} \end{array} \right) \iff As = b$$ A solution $s$ must fulfill all the equations from the $k$ subsystems $F_{(i)}s= g_{(i)}$, thus simultaneously.

• The $t$ stands for transpose? – urquiza Nov 7 '15 at 19:26
• Okay so to construct the "total" ${\bf F}$ I take each ${\bf F}(\xi)$, transpose it, and pile one on top of the others? – urquiza Nov 7 '15 at 19:28
• I usually refer to a vector as a column vector. But you can state your terminology in the answer to make it clear, feel free to explain in any way you feel okay with, I'm listening. :) – urquiza Nov 7 '15 at 19:45
• Yeah, $F s = g$. Sorry, I missed that mistake =P. It's the equation of a linear system of equations, so yeah. $Ax=b$. – urquiza Nov 7 '15 at 19:53