MHB A and solution are known find B matrix

  • Thread starter Thread starter TomSavage
  • Start date Start date
  • Tags Tags
    Matrix
TomSavage
Messages
4
Reaction score
0
I have the matrix of A

1 2 -1
2 -1 1

and i am asked if there is any B matrix that can make AB = 1-1
1 1

I assume that this is not possible because if we follow the law of Ax=B then {A}^{-1} * B =x and since matrix a is singular then it cannot be inverted and thus this operation is impossible. Am I wrong in thinking this?
 
Physics news on Phys.org
TomSavage said:
I have the matrix of A

1 2 -1
2 -1 1

and i am asked if there is any B matrix that can make AB = 1-1
1 1

I assume that this is not possible because if we follow the law of Ax=B then {A}^{-1} * B =x and since matrix a is singular then it cannot be inverted and thus this operation is impossible. Am I wrong in thinking this?

Hi TomSavage! Welcome to MHB! ;)

I'm afraid that's not quite true.

We can solve
$$\begin{pmatrix}
1 &2 &-1\\
2 &-1 &1
\end{pmatrix}\begin{pmatrix}
b_{11}\\b_{21}\\b_{31}
\end{pmatrix} = \begin{pmatrix}
1\\1
\end{pmatrix}$$
can't we?

It is under determined so that it has infinitely many solutions.
We can solve it with Gaussian elimination and pick for instance:
$$\begin{pmatrix}
b_{11}\\b_{21}\\b_{31}
\end{pmatrix} = \begin{pmatrix}
3/5\\1/5\\0
\end{pmatrix}$$

Similarly we can solve:
$$\begin{pmatrix}
1 &2 &-1\\
2 &-1 &1
\end{pmatrix}\begin{pmatrix}
b_{12}\\b_{22}\\b_{32}
\end{pmatrix} = \begin{pmatrix}
-1\\1
\end{pmatrix}$$

Combining the result with the first solution we get:
$$\begin{pmatrix}
1 &2 &-1\\
2 &-1 &1
\end{pmatrix}\begin{pmatrix}
3/5 &0 \\1/5 &0 \\0 & 1
\end{pmatrix} = \begin{pmatrix}
1 & -1\\1 & 1
\end{pmatrix}$$

There you go, a solution for $B$.

More generally, we can find a solution in the least-square sense with:
$$B=A^+ \begin{pmatrix}
1 & -1\\1 & 1
\end{pmatrix}$$
where $A^+$ is the Moore-Penrose pseudoinverse.
The wiki article also explains how we can use it to find all solutions.
 
Klaas van Aarsen said:
Hi TomSavage! Welcome to MHB! ;)

I'm afraid that's not quite true.

We can solve
$$\begin{pmatrix}
1 &2 &-1\\
2 &-1 &1
\end{pmatrix}\begin{pmatrix}
b_{11}\\b_{21}\\b_{31}
\end{pmatrix} = \begin{pmatrix}
1\\1
\end{pmatrix}$$
can't we?

It is under determined so that it has infinitely many solutions.
We can solve it with Gaussian elimination and pick for instance:
$$\begin{pmatrix}
b_{11}\\b_{21}\\b_{31}
\end{pmatrix} = \begin{pmatrix}
3/5\\1/5\\0
\end{pmatrix}$$

Similarly we can solve:
$$\begin{pmatrix}
1 &2 &-1\\
2 &-1 &1
\end{pmatrix}\begin{pmatrix}
b_{12}\\b_{22}\\b_{32}
\end{pmatrix} = \begin{pmatrix}
-1\\1
\end{pmatrix}$$

Combining the result with the first solution we get:
$$\begin{pmatrix}
1 &2 &-1\\
2 &-1 &1
\end{pmatrix}\begin{pmatrix}
3/5 &0 \\1/5 &0 \\0 & 1
\end{pmatrix} = \begin{pmatrix}
1 & -1\\1 & 1
\end{pmatrix}$$

There you go, a solution for $B$.

More generally, we can find a solution in the least-square sense with:
$$B=A^+ \begin{pmatrix}
1 & -1\\1 & 1
\end{pmatrix}$$
where $A^+$ is the Moore-Penrose pseudoinverse.
The wiki article also explains how we can use it to find all solutions.
Hey, I now understand mostly everything but what I don't know is how you got the solutions for B31 and B32. Did you get the other 4 solutions from gauss jordan and then just put the other two in that satisfy the solution or is there a direct mathematical method to get them because wouldn't adding the (3X1) solution set into the (2x3) matrix mess things up?
 
TomSavage said:
Hey, I now understand mostly everything but what I don't know is how you got the solutions for B31 and B32. Did you get the other 4 solutions from gauss jordan and then just put the other two in that satisfy the solution or is there a direct mathematical method to get them because wouldn't adding the (3X1) solution set into the (2x3) matrix mess things up?

Let me show you how to solve:
$$\begin{pmatrix}
1 &2 &-1\\
2 &-1 &1
\end{pmatrix}\begin{pmatrix}
b_{11}\\b_{21}\\b_{31}
\end{pmatrix} = \begin{pmatrix}
1\\1
\end{pmatrix}$$
with Gaussian elimination.

Take the first row, multiply it with $-2$, and add it to the second row.
Consequently we get a new system that has the same solutions as the previous system.
The result is:
$$\begin{pmatrix}
1 &2 &-1\\
0 &-5 &3
\end{pmatrix}\begin{pmatrix}
b_{11}\\b_{21}\\b_{31}
\end{pmatrix} = \begin{pmatrix}
1\\-1
\end{pmatrix}$$

Starting from the bottom, we pick $b_{31}=0$, and see what happens afterwards.
To solve the second equation, we need $b_{21}=\frac 15$ now.
Then we solve the first equation, using the values we found so far, and we can with $b_{11}=\frac 35$.

There you go. We found one of the infinite number of solutions: $(b_{11},b_{21},b_{31})=(\frac 35, \frac 15, 0)$.Alternatively, we might have started with $b_{21}=0$.
Then we need $b_{31}=-\frac 13$ to solve the second equation.
And finally $b_{11}=\frac 23$ to solve the first equation for the solution $(b_{11},b_{21},b_{31})=(\frac 23, 0, -\frac 13)$.
Note that these 2 solutions together 'span' the solution space.
 
Thread 'How to define a vector field?'
Hello! In one book I saw that function ##V## of 3 variables ##V_x, V_y, V_z## (vector field in 3D) can be decomposed in a Taylor series without higher-order terms (partial derivative of second power and higher) at point ##(0,0,0)## such way: I think so: higher-order terms can be neglected because partial derivative of second power and higher are equal to 0. Is this true? And how to define vector field correctly for this case? (In the book I found nothing and my attempt was wrong...

Similar threads

Replies
33
Views
1K
Replies
24
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
2
Views
848
  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K