Solve X in Matrix Equation: AX=XB

  • Thread starter Thread starter Cmunro
  • Start date Start date
  • Tags Tags
    Matrix
AI Thread Summary
The discussion revolves around solving the matrix equation AX = XB, where A and B are given matrices. Participants explore various methods to isolate X, including attempting to manipulate the equation into a linear system of equations. They derive four equations from the matrix components but initially struggle to see how to solve them effectively. The conversation highlights the use of the Gauss-Jordan elimination method as a potential solution strategy, with some participants expressing confusion about its application. Ultimately, they conclude that X can be expressed in terms of a free parameter, indicating there are infinitely many solutions.
Cmunro
Messages
33
Reaction score
0
The question is as follows:

Find X:

[1 0]...[2 -1]
[1 2] X= X [-1 2] (sorry that is the only way I thought to show the matrix..ignore the dots)

My attempt:

I tried to work this out by making it simpler:
AX=XB

But even if I inverse the A or the B.. I still can't get X on its own.

Any suggestions would be greatly appreciated.

Thanks in advance
 
Last edited:
Physics news on Phys.org
have you tried to solve this as a linear system of equations?
 
I tried.. at least..

If I moved the A around it would become

X= A(inv)XB
likewise the B:
AXB(inv)=X

or..
AX=XB
A=XBX(inv)

Then it just seems to be circular.

I just wonder if there is a rule I have overlooked. As I know that AB does not equal BA..
 
malawi_glenn said:
have you tried to solve this as a linear system of equations?

This is a good piece of advice, why don't you listen to it?
 
I meant, solve it by explicit performing all the matrix multiplication and then solve the liear system of equations. You will get 4 equations with 4 unknowns.

Hint: X must be a 2x2 matrix,

X = \left(\begin{array}{cc} x_{11} & x_{12}\\x_{21} & x_{22}\end{array}\right)
 
"This is a good piece of advice, why don't you listen to it?"

Oh I thought he that by linear equations he meant just that.

Right, now I see what you mean. I'll have a go at it that way and let you know how I do.
 
Ok.. I'm sure this must be very obvious - but I'm just not sure where I am going with this.

so:
[1 0][X1 X2]...[X1 X2][2 -1]
[1 2][X3 X4] =[X3 X4][-1 2]

[(X1)...(X2)]...[(2X1-X2)...(-X1+2X20]
[(X1+2X3) (X2+2X4)] =[(2X3-X4)...(-X3+X4)]

Again, sorry, bad formatting. Ignore the dots and whatnot

This however only makes 2 equations - so did I get the wrong end of the stick and this is not quite what I am supposed to be doing?
 
?? Each matrix has 4 components and in order that the two matrices be equal each of the 4 components in one must be equal to the corresponding component in the other. Why does that not give you 4 equations?
If your multiplication is correct, the equations are
X1= 2X1- X2, X2= -!1+ 2X2, X1+ 2X3= 2X3- X4, X2+ 2X4= -X3+ X4.

Can you solve those 4 equations for the 4 unknowns?
 
Oh dear. Brain fart. For some reason I just took the top bit and the bottom bit as two equations.
 
Last edited:
  • #10
Ok so.. 4 equations:

X1=2X1 -X2 (1)
X2= -X1 +2X2 (2)
X1+2X3 =2X3-X4 (3)
X2+2X4=-X3+X4 (4)

Sub (1) into (2)
2X1-X2=-X1+2X2
and X2=X1

Also, manipulation of (3) gives X2 (likewise X1)= -X4

Sub this info into (4)

-X4 +2X4 = -X3 +X4
which gives:
X4=-X3/2

but now I'm stuck. Seems to become very circular. Am I missing something completely?
 
  • #11
are you familiar with Gauss-Jordan method for linear systems?
 
  • #12
No I'm not. A quick search of my textbook (Mathematics for the international student IB SL..John Owen et. al -if that means anything) did not give any results.

I searched online. Would you say this gives a good explanation? http://en.wikipedia.org/wiki/Gauss-Jordan_elimination if so, I'll study it closely and see. Nevertheless, I can't imagine we'd be set a summer work question on something we have not covered.
 
Last edited:
  • #13
Gauss-Jordan method for linear systems is like the first thing you learn in linear algebra. Can be found in any textbook on linear algebra, my suggestion is that you either search the internet more or look in the library.

Lets say we have this system:

x + 3y = 1
3x - y = 2

matrix representation:
\left(\begin{array}{cc} 1 & 3\\ 3 & -1\end{array}\right) \left(\begin{array}{c} x \\ y\end{array} \right) = \left(\begin{array}{c} 1\\ 2\end{array}\right)

On the second row, substract 3*row#1

\left(\begin{array}{cc|c} 1 & 3 & 1\\ 0 & -10 & -1\end{array} \right) \

Now multiply second row with -10

\left(\begin{array}{cc|c} 1 & 3 & 1\\ 0 & 1 & 1/10\end{array} \right) \

Substract from row#1, 3*row#2:

\left(\begin{array}{cc|c} 1 & 0 & 1- 3/10\\ 0 & 1 & 1/10\end{array} \right) \

x = 1 - 3/10 = 7/10 and
y = 1/10

solves that linear system of equations
x + 3y = 1
3x - y = 2

Check:
7/10 + 3*(1/10) = 10/10 = 1
and
21/10 - 1/10 = 20/10 = 2
 
  • #14
I'm completely at a loss for how to apply this to the question at hand, and I don't believe I have been taught this.
I understand the system you have described, I have no numbers at all to work with though for my question...right?
 
  • #15
"Ok so.. 4 equations:

X1=2X1 -X2 (1)
X2= -X1 +2X2 (2)
X1+2X3 =2X3-X4 (3)
X2+2X4=-X3+X4 (4)"

x_1 - 2x_1 + x_2 = 0
x_2 + x_1 - 2x_2 = 0
x_1 + 2x_3 - 2x_3 - x_4 = 0
x_2 + 2x_4 +x_3 - x_4 = 0

-x_1 + x_2 = 0
x_1 - x_2 = 0
x_1 - x_4 = 0
x_2 + x_4 +x_3 = 0

Now the matrix-equaion is:

\left(\begin{array}{cccc} -1 & 1 & 0 & 0\\ 1 & -1 & 0 & 0 \\ 1 & 0 & 0 & -1\\ 0 & 1 & 1 &1\end{array}\right) \left(\begin{array}{c} x_1 \\ x_2 \\ x_3 \\ x_4\end{array} \right) = \left(\begin{array}{c} 0 \\ 0 \\ 0 \\0 \end{array}\right)
 
  • #16
I'm really stumped.. because I can't see how to get any other number than zero on the right side.
 
  • #17
You said you understood my example =P

\left(\begin{array}{cccc|c} -1 & 1 & 0 & 0 & 0 \\ 1 & -1 & 0 & 0 & 0 \\ 1 & 0 & 0 & -1 & 0\\ 0 & 1 & 1 &1 & 0\end{array}\right)

reduces to

\left(\begin{array}{cccc|c} 1 & -1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & -1 & 0\\ 0 & 0 & 1 &2 & 0\end{array}\right)

let x_4 = t, t \in \mathbb{R}

Now you take it from here.

I might have some number wrong, I do this a bit sloppy, science I am right bissy at the moment, but I juts want to give you an Idea how to solve this.
 
Last edited:
  • #18
I shot off an email to my teacher, and he said that Gauss-Jordan is a much more complicated way to work it out. The hint is that there are an infinite number of solutions.

So I have canceled down the equations to look like this:
a=b
b=-c
b=-d

It seems very simple.. so I'm not sure. Apparently I should give the answer in terms of a, which would basically be

[a a]
[-a -a]
 
  • #19
Cmunro said:
I shot off an email to my teacher, and he said that Gauss-Jordan is a much more complicated way to work it out. The hint is that there are an infinite number of solutions.

So I have canceled down the equations to look like this:
a=b
b=-c
b=-d

It seems very simple.. so I'm not sure. Apparently I should give the answer in terms of a, which would basically be

[a a]
[-a -a]

Using Gauss Jordan is a very simple thing, but it takes some time. And what is a, b etc? And the way I did it, the answers is in terms of t, a real parameter, but i took it out and put it in front of the matrix (multiplication with a scalar). And, yes, maybe Gauss jordan method is "overkill" in this problem, but when you have more complex equation systems to work on, this is the thing, nad using it with easier problems keep you "in shape"

Anyway this is a solution:

<br /> \left( \begin{array}{cc}1 &amp; 0 \\ 1 &amp; 2 \end{array}\right) \left( \begin{array}{cc}x_1 &amp; x_2 \\ x_3 &amp; x_4 \end{array}\right) = \left( \begin{array}{cc}x_1 &amp; x_2 \\ x_3 &amp; x_4 \end{array}\right) \left( \begin{array}{cc}2 &amp; -1 \\ -1 &amp; 2 \end{array}\right)<br />

<br /> \left( \begin{array}{cc} x_1 &amp; x_2 \\ x_1 + 2x_3 &amp; x_2 +2x_4 \end{array}\right) = <br /> \left( \begin{array}{cc} 2x_1 - x_2 &amp; -x_1 + 2x_2 \\ 2x_3 - x_4 &amp; -x_3 +2x_4 \end{array}\right)<br />


x_1 = 2x_1 - x_2
x_2 = -x_1 + 2x_2
x_1 + 2x_3 = 2x_3 - x_4
x_2 +2x_4 = -x_3 +2x_4


-x_1 + x_2 =0
x_1 - x_2 =0
x_1 + x_4 =0
x_2 + x_3 = 0




<br /> \left( \begin{array}{cccc|c} -1 &amp; 1 &amp; 0 &amp; 0 &amp; 0 \\ 1 &amp; -1 &amp; 0 &amp; 0 &amp; 0 \\ 1 &amp; 0 &amp;0 &amp; 1 &amp;0\\<br /> 0&amp;1&amp;1&amp;0&amp;0 \end{array}\right)<br />

Adding and substractning multiples of the rows:

<br /> \left( \begin{array}{cccc|c} 1 &amp; -1 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 1 &amp;0 &amp; 1 &amp;0\\<br /> 0&amp;0&amp;1&amp;-1&amp;0 \end{array}\right)<br />

now let x_4 = t , t \in \mathbb{R}

x_3 = x_4 \rightarrow x_3 = t , x_2 = -x_3 \rightarrow x_2 = - t
x_1 = x_2 \rightarrow x_1 = -t

<br /> X \equiv \left( \begin{array}{cc}x_1 &amp; x_2 \\ x_3 &amp; x_4 \end{array}\right) = t\left( \begin{array}{cc}-1 &amp; -1 \\ 1 &amp; 1 \end{array}\right)<br /> \end{equation}
 
Last edited:
  • #20
Oh sorry! I moved from variations of X to a,b,c,d as it became much easier to manage that way:

i.e matrix x:
[a b]
[c d]

Where the equations become four as before, but cancel out to give the above simplifications of a=b, b=-c, b=-d.
So x is basically:
[a a]
[-a -a]

It is essentially the same thing I believe (though it looks like your signs are different). Thanks so much for your time and help. :smile:

I'll keep Gauss-Jordan method in mind for more complicated questions.
 
Last edited:
  • #21
Yesterday, 12:25 PM #10
Cmunro

Ok I see, early in the morning here in Sweden hehe.

The reason for why I introduced Gauss-jordan method was because you wrote this in your post #10:

"ok four equations

X1=2X1 -X2 (1)
X2= -X1 +2X2 (2)
X1+2X3 =2X3-X4 (3)
X2+2X4=-X3+X4 (4) "

And I did not check if that was right before I did that linear equation system on matrix form.

You maybe can find something on this site about basic linear algebra and its methods and applications, if you are interrested in learning more:
http://freescience.info/Mathematics.php?id=248

Amd yeah my signs are different, but you shoudl be aware that both your "a" and my "t" is a free parameter that also can have negative values. Thats why we must write what numbers our parameters can take. I wrote that t is a real number. My teacher in linear algebra was very hard on this, if we missed to state what values our parameters could have, we got almost no points on that question on the exam hehe =)

[3 3]
[-3 -3] and

[-3 -3]
[3 3]

are solutions etc, are you with me ?
 
Last edited:
  • #22
ahh yes - I see what you mean! It is added to my answer - I always forget to give the parameters.

Anyway, I appreciate all the time you have given!
 

Similar threads

Back
Top