Solve X in Matrix Equation: AX=XB

  • Thread starter Cmunro
  • Start date
  • Tags
    Matrix
In summary: The Solution:In summary, the question is asking for a matrix equation that represents the following:Find X:X=-1+2X20
  • #1
Cmunro
34
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
  • #2
have you tried to solve this as a linear system of equations?
 
  • #3
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..
 
  • #4
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?
 
  • #5
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,

[tex] X = \left(\begin{array}{cc} x_{11} & x_{12}\\x_{21} & x_{22}\end{array}\right) [/tex]
 
  • #6
"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.
 
  • #7
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?
 
  • #8
?? 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?
 
  • #9
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:
[tex] \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) [/tex]

On the second row, substract 3*row#1

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

Now multiply second row with -10

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

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

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

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:

[tex] \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) [/tex]
 
  • #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

[tex] \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) [/tex]

reduces to

[tex] \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) [/tex]

let x_4 = t, [tex] t \in \mathbb{R} [/tex]

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:

[tex]
\left( \begin{array}{cc}1 & 0 \\ 1 & 2 \end{array}\right) \left( \begin{array}{cc}x_1 & x_2 \\ x_3 & x_4 \end{array}\right) = \left( \begin{array}{cc}x_1 & x_2 \\ x_3 & x_4 \end{array}\right) \left( \begin{array}{cc}2 & -1 \\ -1 & 2 \end{array}\right)
[/tex]

[tex]
\left( \begin{array}{cc} x_1 & x_2 \\ x_1 + 2x_3 & x_2 +2x_4 \end{array}\right) =
\left( \begin{array}{cc} 2x_1 - x_2 & -x_1 + 2x_2 \\ 2x_3 - x_4 & -x_3 +2x_4 \end{array}\right)
[/tex]


[tex]x_1 = 2x_1 - x_2 [/tex]
[tex]x_2 = -x_1 + 2x_2[/tex]
[tex]x_1 + 2x_3 = 2x_3 - x_4 [/tex]
[tex]x_2 +2x_4 = -x_3 +2x_4 [/tex]


[tex] -x_1 + x_2 =0[/tex]
[tex]x_1 - x_2 =0[/tex]
[tex]x_1 + x_4 =0[/tex]
[tex]x_2 + x_3 = 0[/tex]




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

Adding and substractning multiples of the rows:

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

now let [tex] x_4 = t , t \in \mathbb{R}[/tex]

[tex] x_3 = x_4 \rightarrow x_3 = t , x_2 = -x_3 \rightarrow x_2 = - t [/tex]
[tex] x_1 = x_2 \rightarrow x_1 = -t [/tex]

[tex]
X \equiv \left( \begin{array}{cc}x_1 & x_2 \\ x_3 & x_4 \end{array}\right) = t\left( \begin{array}{cc}-1 & -1 \\ 1 & 1 \end{array}\right)
\end{equation} [/tex]
 
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!
 

FAQ: Solve X in Matrix Equation: AX=XB

1. What is a matrix equation?

A matrix equation is an equation that involves matrices, which are rectangular arrays of numbers or variables. It is written in the form of AX=XB, where A and B are matrices and X is the unknown variable.

2. How do you solve for X in a matrix equation?

To solve for X in a matrix equation, you can use a variety of methods such as Gaussian elimination, Cramer's rule, or matrix inversion. The specific method used will depend on the size and properties of the matrices involved.

3. What is the importance of solving matrix equations?

Matrix equations are important in many fields of science, such as physics, engineering, and economics. They allow us to model and solve complex systems, and are often used to represent and manipulate data in computer algorithms.

4. Can a matrix equation have multiple solutions?

Yes, a matrix equation can have multiple solutions. This occurs when the matrices involved are not square, or when the matrices are dependent on each other. In these cases, there may be an infinite number of solutions to the equation.

5. Are there any limitations to solving matrix equations?

Yes, there are limitations to solving matrix equations. One limitation is that not all matrix equations have a solution. This can happen when the matrices involved are not compatible, meaning they cannot be multiplied together. Additionally, solving large matrix equations can be computationally intensive and may require advanced techniques or software.

Similar threads

Replies
69
Views
4K
Replies
7
Views
2K
Replies
13
Views
2K
Replies
32
Views
1K
Replies
8
Views
2K
Replies
6
Views
1K
Back
Top