Page 1 of 1
complex numbers
Posted: Mon Sep 19, 2005 5:11 am
by distantvoices
Help is what I am asking for ... *rofl*
I have a kind of assignment here. It's due in a fortnight so I reckon, I've gon enough time to solve it on my own.
But alas my maths is so rusty that I don't remember many a thing anymore.
Here is an example which I need to solve in order to get the assignment solved - it's for understanding the damned thing:
complex numbers are usually written in this way: a+bi iirc.
-8i gives the polar coordinates (8,270?)
I know the formula for r = sqrt(a?+b?). For -8i this gives sqrt(8?) which is - no wonder - 8.
now comes the tricky thing: how do I get the y(phi)==270??
because y(phi) is said to be b/a - this would in this case mean -8/? -> -8/1?
I'm completely dumbfound at this. Maybe someone can elucidate me on this matter?
Thanks very much
Re:complex numbers
Posted: Mon Sep 19, 2005 5:39 am
by AR
I'm not sure I follow this properly,
-8i = ? [What variable does "i" represent?]
r = sqrt(a[sup]2[/sup]+b[sup]2[/sup]) [Looks like Pythagoras' Theorem]
-8i = sqrt(8[sup]2[/sup]) [...?]
y(phi) == 270 [This is the most confusing, is "y" a function? Or are you multiplying it by everything in the brackets, in which case are "phi" one thing or 3 variables?]
y(phi) = b/a [Without knowing what the equation is about, this just gets more confusing]
Can you start again, what are all the equations and relations to each other? Also, what inputs go in which is variables as well?
Re:complex numbers
Posted: Mon Sep 19, 2005 5:42 am
by Solar
i is the imaginary part of a complex number. If you have to ask for that, this question isn't for you.
(No offense intended, I
know what i is, and still complex numbers give me headaches so I can't answer the question either.
)
Re:complex numbers
Posted: Mon Sep 19, 2005 5:53 am
by distantvoices
OK. That's gonna confuse the bejeezes out of us.
The y(phi) --> sorry for this one. I mean to describe a greek letter called "phi". That didn't work out well I reckon.
the whole term "-8i" is an imaginary number.
The example I give is about transforming a given complex number into polar coordinates.
Look: any complex number is given like this: a+bi, where a and b are any [x E R+]. It looks like this: (-5+6i).>> and in this form I am able to solve my problem. *wham*
now to the transformation of a complex number into polar coordinates in a gauss map:
a complex number in the gauss map is represented by (r,"phi")
"phi" is calculated this way: b/a (see def of complex number above)
r = sqrt(a?+b?)
voila, that's it basically.
Now, I have a given term "-8i".
To calculate polar coordinates, I calculate r, "phi" as mentioned above:
r=sqrt(8?)=8. As we have no a, I only put b into the formula - ergo 8.
"phi"=b/a = 8/? ->what do I divide this by?
Still I'm at a loss as if I'm missing something simple and crucial.
Re:complex numbers
Posted: Mon Sep 19, 2005 6:04 am
by AR
ok, I hope I never have to actually use these then, looks awful.
@BI: Ok, I think I understand the concept, the only thing I can think of is that the minus is "a" (ie. a=-1) but that wouldn't make sense in conventional algebra, otherwise a=0 which would explain why it's missing but the answer (phi) would then be "infinity" which wouldn't make sense either (or it might... ???).
Re:complex numbers
Posted: Mon Sep 19, 2005 6:08 am
by Candy
beyond infinity wrote:
I know the formula for r = sqrt(a?+b?). For -8i this gives sqrt(8?) which is - no wonder - 8.
now comes the tricky thing: how do I get the y(phi)==270??
because y(phi) is said to be b/a - this would in this case mean -8/? -> -8/1?
I'm completely dumbfound at this. Maybe someone can elucidate me on this matter?
The y function you're looking for is the tan function. The tangent of the angle is the first axis divided by the second axis. This doesn't work (nicely) with the exact angles up and down, but you can assume from me that they are sort of trivial.
You divide one of them by the other and take the arctangent. That gives you the angle (same as in normal trigonometry), but in this case the angle between the real and the imaginary axis. If the number you divide by is 0, you obviously can't divide. In that case, if the imaginary axis is negative , the angle is 270, if it's positive it's 90.
For extra clarity draw a unity circle for the real and imaginary planes and try out the angles.
Just a hint for the future: multiplying two complex numbers is multiplying their lengths normally and adding the two angles. Dividing them is dividing the lengths and substracting the angles. The square root is taking the square root of the length and dividing the angle by 2.
Stuff you can do easily with that last bit: the square root of 1 is 1 or -1. The square root of -1 is i or -i. The square root of i is sqr(1/2) + sqr(1/2) * i or -sqr(1/2) - sqr(1/2) * i. Taking these forms of square roots from 0 are called complex roots of zero, and are used a lot in signal processing.
Oh, sidenote, I'm working at a radio telescope nowadays
[edit]
any complex number is given like this: a+bi
So if you add Beyond Illusion to a random number it's complex? I thought you were real BI ?
On the a/b derivation, you add 0 to the -8*i. So, a = 0, b = -8. You in fact divide -8 by 0 to get negative infinity, and then take the arctangent of that, which is 270. Since most calculators suck at infinity, just use it as a rule that if you divide by 0, it's either negative to get 270 or positive to get 90.
If you draw a unity circle for it, the 0-angle is to the right, and they increase as you turn counter-clockwise. So, 90 is up (positive imaginary), 180 is left (negative real) and 270 is down (negative imaginary). 360 is right, positive real, but that's identical to 0.
Re:complex numbers
Posted: Mon Sep 19, 2005 6:36 am
by Solar
AR wrote:
ok, I hope I never have to actually use these then, looks awful.
ROTFL!
100% ACK.
And I
know I'll have to do the stuff sooner or later. <complex.h> is part of the C99 library...
That is, not only do I have to
use them, I have to
implement those functions to use them...
Re:complex numbers
Posted: Mon Sep 19, 2005 6:45 am
by distantvoices
@Candy: how can one know? *rofl* If my GF tickles me, I know for *sure* I'm far away from being a dream. *gg* Thanks for the elucidating, you've helped me a lot with this stuff.
@Solar: And I have to deal with the stuff due to study. Maths is one of the knock outs at the FH I'm attending so I better get a grip on it.
Re:complex numbers
Posted: Mon Sep 19, 2005 9:11 am
by Candy
Solar wrote:
AR wrote:
ok, I hope I never have to actually use these then, looks awful.
And I
know I'll have to do the stuff sooner or later. <complex.h> is part of the C99 library...
That is, not only do I have to
use them, I have to
implement those functions to use them...
*salutes in military fashion* Code-warrior Candy reporting, sir. We are ready to take on the big numbers with complex tactics.
@bi : If you have any more questions just ask away, or mail me at
[email protected] or call me (+31-6-26686552, preferably english)
Re:complex numbers
Posted: Mon Sep 19, 2005 11:39 am
by Eero Ränik
Uh, I just wrote a bunch of code to handle them, a week ago or so, I might post the code later. I like complex numbers though. They're fun.