# Matrix trouble

1. Aug 8, 2007

### Cmunro

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: Aug 8, 2007
2. Aug 8, 2007

### malawi_glenn

have you tried to solve this as a linear system of equations?

3. Aug 8, 2007

### Cmunro

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. Aug 8, 2007

### radou

This is a good piece of advice, why don't you listen to it?

5. Aug 8, 2007

### malawi_glenn

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)$$

6. Aug 8, 2007

### Cmunro

"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. Aug 8, 2007

### Cmunro

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. Aug 8, 2007

### HallsofIvy

Staff Emeritus
?? 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. Aug 8, 2007

### Cmunro

Oh dear. Brain fart. For some reason I just took the top bit and the bottom bit as two equations.

Last edited: Aug 8, 2007
10. Aug 8, 2007

### Cmunro

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. Aug 8, 2007

### malawi_glenn

are you familiar with Gauss-Jordan method for linear systems?

12. Aug 8, 2007

### Cmunro

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: Aug 8, 2007
13. Aug 8, 2007

### malawi_glenn

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. Aug 8, 2007

### Cmunro

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. Aug 8, 2007

### malawi_glenn

"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. Aug 8, 2007

### Cmunro

I'm really stumped.. because I can't see how to get any other number than zero on the right side.

17. Aug 8, 2007

### malawi_glenn

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, scince I am right bissy at the moment, but I juts want to give you an Idea how to solve this.

Last edited: Aug 8, 2007
18. Aug 8, 2007

### Cmunro

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 cancelled 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. Aug 9, 2007

### malawi_glenn

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:

$$\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)$$

$$\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)$$

$$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$$

$$\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)$$

Adding and substractning multiples of the rows:

$$\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)$$

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$$

$$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)$$

Last edited: Aug 9, 2007
20. Aug 9, 2007

### Cmunro

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.

I'll keep Gauss-Jordan method in mind for more complicated questions.

Last edited: Aug 9, 2007
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?