Using A^-1 to solve system of linear equations in form Ax=b

sigma

Junior Member
Joined
Feb 19, 2006
Messages
106
Heres the question.

Consider the following system of linear equations
\(\displaystyle \
\L\
\begin{array}{l}
{\rm }x_1 + x_2 + x_3 = 2 \\
2x_1 + 3x_2 + 3x_3 + 1x_4 = 4 \\
3x_1 + 3x_2 + 4x_3 + 3x_4 = 3 \\
4x_1 + 4x_2 + 4x_3 + 1x_4 = 1 \\
\end{array}
\\)

a. Rewrite this system of linear equations as a single matrix
equation in the form Ax = b.

b. Use the matrix \(\displaystyle A^{-1}\) to find the solution x.

So I have done most of the work for the question but for some reason, my values for x1, x2, x3 and x4 seem to be wrong because when I put them into Ax=b and see if it matches up to the values for b, they don't and I don't know why because I'm doing everything right. I know my inverse of A is correct because I checked it and proved it was right. I am doing every other calculation right, I went over it at least 6 times still getting the same answers. I did another problem similar to one like this using the same method and got that right. I just don't know why my numbers are not matching up. Here's my work.

\(\displaystyle \
\L\
\begin{array}{l}
Ax = b \to \left[ {\begin{array}{*}
1 & 1 & 1 & 0 \\
2 & 3 & 3 & 1 \\
3 & 3 & 4 & 3 \\
4 & 4 & 4 & 1 \\
\end{array}} \right]\left[ {\begin{array}{*}
{x_1 } \\
{x_2 } \\
{x_3 } \\
{x_4 } \\
\end{array}} \right] = \left[ {\begin{array}{*}
2 \\
4 \\
3 \\
1 \\
\end{array}} \right] \\
x = A^{ - 1} b \to \left[ {\begin{array}{*}
{x_1 } \\
{x_2 } \\
{x_3 } \\
{x_4 } \\
\end{array}} \right] = \left[ {\begin{array}{*}
1 & 1 & 1 & 0 \\
2 & 3 & 3 & 1 \\
3 & 3 & 4 & 3 \\
4 & 4 & 4 & 1 \\
\end{array}} \right]^{ - 1} \left[ {\begin{array}{*}
2 \\
4 \\
3 \\
1 \\
\end{array}} \right] \\
\left[ {\begin{array}{*}
{x_1 } \\
{x_2 } \\
{x_3 } \\
{x_4 } \\
\end{array}} \right] = \left[ {\begin{array}{*}
{ - 1} & { - 1} & 0 & 1 \\
{ - 7} & 1 & { - 1} & 2 \\
9 & 0 & 1 & { - 3} \\
4 & 0 & 0 & 1 \\
\end{array}} \right]\left[ {\begin{array}{*}
2 \\
4 \\
3 \\
1 \\
\end{array}} \right] \\
\left[ {\begin{array}{*}
{x_1 } \\
{x_2 } \\
{x_3 } \\
{x_4 } \\
\end{array}} \right] = \left[ {\begin{array}{*}
{ - 5} \\
{ - 11} \\
{18} \\
9 \\
\end{array}} \right] \\
\\
Ax = b \to \left[ {\begin{array}{*}
1 & 1 & 1 & 0 \\
2 & 3 & 3 & 1 \\
3 & 3 & 4 & 3 \\
4 & 4 & 4 & 1 \\
\end{array}} \right]\left[ {\begin{array}{*}
{ - 5} \\
{ - 11} \\
{18} \\
9 \\
\end{array}} \right] = \left[ {\begin{array}{*}
2 \\
{20} \\
{51} \\
{17} \\
\end{array}} \right]
\\
\end{array}
\\)
Which does not equal to b. My x1 is correct which means I did something correctly but I don't know why x2, x3 or x4 are way off.
 
Re: Using A^-1 to solve system of linear equations in form A

sigma said:
Heres the question.

Consider the following system of linear equations
\(\displaystyle \
\L\
\begin{array}{l}
{\rm }x_1 + x_2 + x_3 = 2 \\
2x_1 + 3x_2 + 3x_3 + 1x_4 = 4 \\
3x_1 + 3x_2 + 4x_3 + 3x_4 = 3 \\
4x_1 + 4x_2 + 4x_3 + 1x_4 = 1 \\
\end{array}
\\)

a. Rewrite this system of linear equations as a single matrix
equation in the form Ax = b.

b. Use the matrix \(\displaystyle A^{-1}\) to find the solution x.

So I have done most of the work for the question but for some reason, my values for x1, x2, x3 and x4 seem to be wrong because when I put them into Ax=b and see if it matches up to the values for b, they don't and I don't know why because I'm doing everything right. I know my inverse of A is correct because I checked it and proved it was right. I am doing every other calculation right, I went over it at least 6 times still getting the same answers. I did another problem similar to one like this using the same method and got that right. I just don't know why my numbers are not matching up. Here's my work.

\(\displaystyle \
\L\
\begin{array}{l}
Ax = b \to \left[ {\begin{array}{*}
1 & 1 & 1 & 0 \\
2 & 3 & 3 & 1 \\
3 & 3 & 4 & 3 \\
4 & 4 & 4 & 1 \\
\end{array}} \right]\left[ {\begin{array}{*}
{x_1 } \\
{x_2 } \\
{x_3 } \\
{x_4 } \\
\end{array}} \right] = \left[ {\begin{array}{*}
2 \\
4 \\
3 \\
1 \\
\end{array}} \right] \\
x = A^{ - 1} b \to \left[ {\begin{array}{*}
{x_1 } \\
{x_2 } \\
{x_3 } \\
{x_4 } \\
\end{array}} \right] = \left[ {\begin{array}{*}
1 & 1 & 1 & 0 \\
2 & 3 & 3 & 1 \\
3 & 3 & 4 & 3 \\
4 & 4 & 4 & 1 \\
\end{array}} \right]^{ - 1} \left[ {\begin{array}{*}
2 \\
4 \\
3 \\
1 \\
\end{array}} \right] \\
\left[ {\begin{array}{*}
{x_1 } \\
{x_2 } \\
{x_3 } \\
{x_4 } \\
\end{array}} \right] = \left[ {\begin{array}{*}
{ - 1} & { - 1} & 0 & 1 \\
{ - 7} & 1 & { - 1} & 2 \\
9 & 0 & 1 & { - 3} \\
4 & 0 & 0 & 1 \\
\end{array}} \right]\left[ {\begin{array}{*}
2 \\
4 \\
3 \\
1 \\
\end{array}} \right] \\
\left[ {\begin{array}{*}
{x_1 } \\
{x_2 } \\
{x_3 } \\
{x_4 } \\
\end{array}} \right] = \left[ {\begin{array}{*}
{ - 5} \\
{ - 11} \\
{18} \\
9 \\
\end{array}} \right] \\
\\
Ax = b \to \left[ {\begin{array}{*}
1 & 1 & 1 & 0 \\
2 & 3 & 3 & 1 \\
3 & 3 & 4 & 3 \\
4 & 4 & 4 & 1 \\
\end{array}} \right]\left[ {\begin{array}{*}
{ - 5} \\
{ - 11} \\
{18} \\
9 \\
\end{array}} \right] = \left[ {\begin{array}{*}
2 \\
{20} \\
{51} \\
{17} \\
\end{array}} \right]
\\
\end{array}
\\)
Which does not equal to b. My x1 is correct which means I did something correctly but I don't know why x2, x3 or x4 are way off.

It looks to me like the inverse is not correct. Calculating

\(\displaystyle \L
AA^{-1}\ =\
\left[ {\begin{array}{*}
1 & 1 & 1 & 0 \\
2 & 3 & 3 & 1 \\
3 & 3 & 4 & 3 \\
4 & 4 & 4 & 1 \\
\end{array}} \right] \left[ {\begin{array}{*}
{ - 1} & { - 1} & 0 & 1 \\
{ - 7} & 1 & { - 1} & 2 \\
9 & 0 & 1 & { - 3} \\
4 & 0 & 0 & 1 \\
\end{array}} \right] \ \not =\ I\)

because the the product of the last row of \(\displaystyle \L A\) and first column of \(\displaystyle \L A^{-1}\) is \(\displaystyle \L - 4 - 28 + 36 + 4 \ \not =\ 0.\)
 
In A<SUP>-1</SUP> your '4' should be "-4".
 
Wonder how I let that slip by. It is -4 and now the numbers match up. Thanks allot!
 
Top