2
$\begingroup$

How can one build a $3\times 3$ linear equation system ($3$ equations with $3$ variables) if the variables are known, for example, $a=1, b=2$ and $c=3$?

Thank you in advance!

  • 2
    Are you sure you meant this? What are you trying to achieve?2010-09-26
  • 1
    Are you trying to create test cases for your linear equation solver? If so, you could just generate the equations randomly and then verify the solution given by your solver by substitution into the original equations.2010-09-26
  • 2
    I apologize for not expressing myself clearly. English is not my 1st language. I have been given three answers (a=1, b=2 and c=3) and I have to build the 3x3 linear equation from them. I want to find out how I can do that.2010-09-26
  • 2
    Artis: as I already said, it's an ill-posed problem; there is no unique solution since there are infinitely many matrix-vector pairs that would have your given as a solution vector.2010-09-26
  • 0
    it seems to me that this intuitive explanation might help you. If you were given only $a=1$ and $b=2$, then you would have infinitely many straight lines on the $x,y$-plane, all having the point $(1,2)$ in common.2010-09-28

4 Answers 4

0

Another possibility is to start with a non-singular upper-left triangular matrix $T$ and the desired solution $\vec{x}=(x_1,x_2,x_3)^t$. Now one adds multiples of upper rows to lower ones to obtain a full matrix $A$, e.q. \begin{gather*} T=\begin{pmatrix}1& 2 & 3\cr 0& 4 & 5\cr 0 & 0 & 6\end{pmatrix},\; \vec{x}=\begin{pmatrix}1\cr 2\cr3\end{pmatrix}\\ T_1=\mbox{3rd row}+2\cdot\mbox{2nd row} =\begin{pmatrix}1& 2 & 3\cr 0& 4 & 5\cr 0 & 8 & 16\end{pmatrix}\\ T_2=\mbox{2nd row}+3\cdot\mbox{1st row} =\cdots\\ T_3=\mbox{3nd row}+5\cdot\mbox{1st row} =\begin{pmatrix}1& 2 & 3\cr 3& 10 & 14\cr 5 & 18 & 31\end{pmatrix} \end{gather*} If the desired solution ist $\vec{x}=(1,2,3)^t$ then $T\cdot \vec{x}$ yields the right hand side $\vec{b}=(14,\,23,\,18)^t$. Transforming $\vec{b}$ according to $T$ gives the linear system \begin{gather*} \begin{pmatrix}1& 2 & 3\cr 3& 10 & 14\cr 5 & 18 & 31\end{pmatrix} \begin{pmatrix}x\cr y\cr z\end{pmatrix} =\begin{pmatrix}14\cr 65\cr 134\end{pmatrix} \end{gather*} Advantage of this method is that there exists a solution for the students with 'easy' numbers.

3

If this is homework, it's a pretty strange one. :-? Anyway, do you like the following system?

$$ \begin{align} x &= 1 \\\ y &= 2 \\\ z &= 3 \end{align} $$

-Too much easy, I see.

So, try this: your system must fulfil the following equation:

$$ A \begin{pmatrix} 1 \\\ 2 \\\ 3 \end{pmatrix} = b $$

where $A$ is a $3\times 3$ matrix and $b$ is a column vector with $3$ coordinates (a $3\times 1$ matrix). Write $a_1, a_2, a_3$ for the columns of $A$. Then this equation is the same as the following equality between vectors in $\mathbb{R}^3$:

$$ a_1 + 2a_2 + 3a_3 = b \ . $$

Now, pick your three (linearly independent) favourite vectors in $\mathbb{R}^3$, put in the places of $a_1, a_2, a_3$, compute the resulting $b$ and you have another system of linear equations with solution $x=1, y=2$, and $z=3$. For instance, if you take $a_1 = (1\ 0\ 0)^t$, $a_2 = (0\ 1 \ 0)^t$ and $a_3 = (0\ 0\ 1)^t$, you'll obtain my first example.


EDIT. Maybe I should add something to explain the necessity of my misterious condition that $a_1, a_2, a_3$ must be "linearly independent".

The reason is the following: if you pick your three vectors randomly (that is to say, you put no matter what coefficients into the matrix $A$), you could obtain systems like

$$ x + y + z = 6 $$

(take $a_1 = a_2 = a_3 = (1\ 0\ 0)^t$). Of course this system has the desired solution $x=1, y=2,$ and $ z=3$, but also an infinite number of them. In fact, the solution set is

$$ (x, y, z) = (1, 2, 3) + \lambda (1, 0, -1) + \mu (0, 1, -1) $$

for all values of $\lambda, \mu$.

Of course, if you fill in the matrix $A$ randomly, the probability of not obtaining three linearly independent vectors $a_1, a_2, a_3$ is zero, but it won't take you too much time and effort to verify that

$$ \det (A) \neq 0 $$

before submitting your homework.

3

If I understand correctly, you have the desired solution for a system of three equations in 3 unknowns and want to know how to construct a system with those solutions. This is a fairly common task for people who teach high-school algebra. The way that I typically do it is to make up the coefficients of the variables first, so something like: $$\begin{align} 3a+4b+5c&= \\\\ 8a-5b+7c&= \\\\ -5a+b+c&= \end{align}$$ then substitute in the desired solutions to get the constant terms on the right side of each equation (using your $a=1$, $b=1$, and $c=3$): $$\begin{align} 3\cdot 1+4\cdot 2+5\cdot 3&=26 \\\\ 8\cdot 1-5\cdot 2+7\cdot 3&=19 \\\\ -5\cdot 1+2+3&=0 \end{align}$$ so that one system with your given solutions would be: $$\begin{align} 3a+4b+5c&=26 \\\\ 8a-5b+7c&=19 \\\\ -5a+b+c&=0 \end{align}$$


edit: I should probably note (similar to the edited note in Agusti Roig's answer) that this method only guarantees that the given values are a solution to the system, not that they are the only solution to the system. As with nearly any problem, it is worthwhile to check that the resulting system has only the solution(s) you want by solving it.

2

It's ill-posed; you can construct any nonsingular matrix $\mathbf A$ to be multiplied with $(1\;2\;3)^T$ for the corresponding right hand side.