I need help with maths :(
Post Reply
Quote
Re: I need help with maths :(
Posted by wil5on on Sun Oct 2nd at 1:00am 2005


I'm sure theres plenty of people here who have done this sort of stuff before... this question has me stumped like no other before it.

Find a matrix P that orthogonally diagonalises
a b 0
b a 0
0 0 1

The fact theres variables in there makes it hard... Any help at all would be appreciated.




"If you talk at all during this lesson, you have detention. Do you understand?"
- My yr11 Economics teacher



Quote
Re: I need help with maths :(
Posted by FatStrings on Sun Oct 2nd at 1:43am 2005


wow
ive done matrices but nothing that complicated
sorry




Quote
Re: I need help with maths :(
Posted by BlisTer on Sun Oct 2nd at 1:49am 2005


few years ago could it be:


1/(a?-b?)*


a.....-b.....0
-b....a......0
0......0...a?-b?


there's nothing complicated about variables, just take them with you in your calculations



These words are my diaries screaming out loud



Quote
Re: I need help with maths :(
Posted by Foxpup on Sun Oct 2nd at 1:56am 2005


I know a fair bit about matrix algebra, but orthogonally diagonalises? I'll have to ask my teacher about that. Must be like hyperbolic sine or one of those other weird things that has no real purpose.


Better to be in denial than to be human.

Bill Gates understands binary: his company is number one, and his customers are all zeros.



Quote
Re: I need help with maths :(
Posted by Crono on Sun Oct 2nd at 2:05am 2005


Linear Algebra ... been awhile ... *grabs book*

Well, If that matrix is matrix A and the diagonalize matrix is P, then:

P^-1 AP = P^T AP is diagonal. That's just a way to check.

So, these are the steps:

1) Find a basis for each eigenspace of A

2) Apply the Gram-Schmidt process to each of these bases to obtain an orthonormal basis for each eigenspace.

3) Form the matrix P whose columns are the basis vectors constructed in step 2; this maitrx orthogonally diagonalizes A.

At to the solution for your problem ... I'm not going to calculate it out right now ... it's pretty heafty, unless there's a trick I'm not seeing (could be an identity).

The answer to the det(lambda * I - A) problem should look something like: (lambda - 1)((lambda - a)2 - b). You get the eiganvalues from that (don't use my solution, unless you calculate it and find it to be correct), use those values to find basis for the eiganspaces.

Then apply Gram-Schmidt process to {u1, u2} to get the orthonotmal eigenvectors. v1, v2, and vn are the columns for matrix P.

Look through your book and it should tell you exactly how to calculate it all, the rest of it relies on your ability to simplify <img src=" SRC="images/smiles/icon_smile.gif">


BlisTer, that's incorrect, since: P^T AP isn't diagonal.

See:

| a(a2-b2) -b(a2-b2) 0 |
| -b(a2-b2) a(a2-b2) 0 |
| 0..............0.(a2-b2)2)|

Anyway. I put up how to solve it ... not sure if your book covers it well though.



Blame it on Microsoft, God does.



Quote
Re: I need help with maths :(
Posted by BlisTer on Sun Oct 2nd at 2:14am 2005


idd.



i thought it was a mindteaser and that we were just looking for A^(-1) since, when multiplied with A that creates a diagonal, orthogonal matrix (the unity matrix).

all starts coming back to me, but i'm not gonna look it up, i think Crono states it correctly.



These words are my diaries screaming out loud



Quote
Re: I need help with maths :(
Posted by wil5on on Sun Oct 2nd at 2:30am 2005


Crono is right... the problem is, it shouldnt be hefty. The only way I know is with eigenspaces, but to do that with these variables would be messy. Theres a trick to this somewhere, I'm sure.


&quot;If you talk at all during this lesson, you have detention. Do you understand?&quot;
- My yr11 Economics teacher



Quote
Re: I need help with maths :(
Posted by mazemaster on Sun Oct 2nd at 6:54am 2005


<pedantic>Its det(A-lambda*I), not (lambda*I-A) since you are looking for solutions v to:
A*v = lambda*v, so:
A*v = lambda*I*v, subtracting:
A*v - lambda*I*v = 0, collecting:
(A - lambda*I)v = 0, assuming v is not the zero vector:
det(A - lambda*I) = 0
</pedantic>

Oh also hyperbolic sine is awesome.






Quote
Re: I need help with maths :(
Posted by ReNo on Sun Oct 2nd at 11:38am 2005


And thought my maths was complicated <img src=" SRC="images/smiles/icon_biggrin.gif"> We just started on eigenvalues and eigenvectors, but eigenspaces are entirely alien to me <img src=" SRC="images/smiles/icon_smile.gif"> God I hate maths...






Quote
Re: I need help with maths :(
Posted by MisterBister on Sun Oct 2nd at 11:50am 2005


? quote:
And thought my maths was complicated We just started on eigenvalues and eigenvectors, but eigenspaces are entirely alien to me God I hate maths...


Yeah i must say that i thought the same.
Ive just started with complex numbers, and its quite f**ked up =P.




Quote
Re: I need help with maths :(
Posted by wil5on on Sun Oct 2nd at 11:55am 2005


When you find an eigenvector, its not just one vector, there are a bunch of solutions to the equation. An eigenspace is the space containing all eigenvectors for that eigenvalue. Not as scary as it sounds I'm in first year, I cant see why they wouldnt teach you this stuff until 4th, particularly in a field like computer games. Yeah... and complex numbers are pretty weird, but not really all that difficult. Relatively speaking.

I cant find anyone else who can do this question... I have less than 2 days until the assignments due, if I find out how to do it I'll post it here




&quot;If you talk at all during this lesson, you have detention. Do you understand?&quot;
- My yr11 Economics teacher



Quote
Re: I need help with maths :(
Posted by ReNo on Sun Oct 2nd at 12:05pm 2005


Mostly because my course sucks balls <img src=" SRC="images/smiles/icon_biggrin.gif"> I'd also say that my maths lecturers are our most competent, though one is a little too humourless and patronising to the less capable in our class. Oh sad, sad truth. Going by my mates in other universities around the UK, degrees in computer science these days seem to boil down to courses in how to program in java. Oh I'm not bitter and cynical...






Quote
Re: I need help with maths :(
Posted by Andrei on Sun Oct 2nd at 1:34pm 2005


? quote:
God I hate maths...


Ditto. I've never actually found any use for more than 90% of the complicated math we learn(ed) in school.
And they all yelled at me that I need math for making games and for flying. WELL GUESS AGAIN! <img src=" SRC="images/smiles/evilgrin.gif">




Quote
Re: I need help with maths :(
Posted by Myrk- on Sun Oct 2nd at 7:09pm 2005


I did A level maths and what you guys are talking about seems like jibberish to me!


-[Better to be Honest than Kind]-



Quote
Re: I need help with maths :(
Posted by Crono on Sun Oct 2nd at 7:55pm 2005


Yeah, Linear Algebra is a 300 level course here. And Orthogonal stuff isn't covered until Chapter 7 ...

As for saying it isn't used: HA HA HA. Yes, yes it is. You'll use it in graphics programming ... a lot. Not orthogonal crap, maybe, but, linear algebra as a whole: yes. That's the only reason they'd be teaching it to you now ... as for your problem ... again ...

lambda = a and 1 ... a, since it's lambda is squared, has two eiganvectors from one eiganspace ... and 1 has one eiganvector ... making up your answer. This was the only thing I had trouble with in my class actually, since it isn't really ... um ... explained how to get from eiganvalues to eiganvectors. I could look up some stuff.

You have to start with the eiganvalues ... a and 1
Use an arbritrary vector, x:

| x1 |
| x2 |
| x3 |

Take the matrix lambda * I - A found earlier and input lambda = a ... the matrix equals 0 as in


| a-a -b 0 | | x1 | | 0 |
| -b a-a 0 | | x2 | = | 0 |
| 0 0 a-1 | | x3 | | 0 |


This yeilds a relation.

-bx2 = 0
-bx1 = 0
a-1x3 = 0

You find the x's, they are related, find them as arbitrary values (s, t, -s ... whatever)

Then, you get the vector, by seperating and simplifying (this is just an example)

Let's say you got values, -s, t, and s, SO

| -s | | -s | | 0 | | -1 | | 0 |
| t | = | 0 | + | t | = s | 0 | + t | 1 |
| s | | s | | 0 | | 1 | | 0 |

And there's two vectors ... get it? You do that for the eiganvalues, find all possibilities (there will be three total) and that's the orthogonal matrix P ...

I hope that font works and lines everything up ... otherwise that might be confusing.



Blame it on Microsoft, God does.



Quote
Re: I need help with maths :(
Posted by Madedog on Sun Oct 2nd at 8:41pm 2005


Damn! All I know about higher maths is the 3D space... damn... I can code opengl and all but matrixes... are new to me <img src=" SRC="images/smiles/icon_biggrin.gif"> I never needed them... I mean like... it is real easy to place vectors in 3D space you know... but can anyone explain me the practical use of matrixeS?



HL2 tutorials 'n' stuff: http://madedog.pri.ee
217.159.236.34:27050 - CSS Server - Clean | koffer.ee



Quote
Re: I need help with maths :(
Posted by mazemaster on Sun Oct 2nd at 9:38pm 2005


? quote:
if I find out how to do it I'll post it here image


Crono has explained to you how to do this... twice. Other than the fact that he's solving for the eigenvalues in a bizarre way that I'm not entirely convinced works, the procedure he describes is exactly correct for orthagonally diagonalizing a matrix.






Quote
Re: I need help with maths :(
Posted by Crono on Sun Oct 2nd at 10:29pm 2005


It's how my book goes about it, actually. It seems to work, there's just a bit of guess work, but it's doable. The procedure works ... I probably didn't explain it well enough though ...

Madedog, matricies and matrix math comes in when conceptualizing ... how do you think OpenGL was written? It does the work for you.

It's kind of like dot product, I was like, "Wow, I'm glad I'll never have to use that again" ... wrong. It's heavily used in shaders.



Blame it on Microsoft, God does.



Quote
Re: I need help with maths :(
Posted by wil5on on Mon Oct 3rd at 12:03am 2005


Thanks Crono, your second post there cleared things up. I'll try out what you did. I was a bit reluctant to actually work out the eigenvalues because it looked like the variables would make it messy :/

Maths is the most useful thing you can learn.




&quot;If you talk at all during this lesson, you have detention. Do you understand?&quot;
- My yr11 Economics teacher



Quote
Re: I need help with maths :(
Posted by Crono on Mon Oct 3rd at 1:37am 2005


Not a problem, it actually took awhile for me to find a proper example in my book that showed how to get from eiganvalues to eiganspaces (lambda * x)/vectors. But, I remember this a little better now. It just seems you've got a funky matrix to deal with. If it had some better values it'd be a five minute type deal. It's doable though.

Anyway, doesn't your book cover this? Seriously. I'd be really surprised if your instructor would give you a problem like this if it wasn't explained well.



Blame it on Microsoft, God does.




Post Reply