GradualGames wrote:
I haven't studied complex numbers in depth yet, but at a high level, what makes complex numbers different from just having a pair of X and Y coordinates, then?
Complex numbers
can be used for various 2D geometry problems, though I think the notation is a bit confusing for someone who is really trying to do 2D geometry and would rather just work with a 2D
vector.
The original reason for
i is simply to solve the
quadratic equation where there are no "real" answers. It is
not the square root of -1, but rather it is the "imaginary" number that when squared will equal -1.
i^{2} = -1When trying to solve a quadratic, if that square root term
b^{2}-4ac is positive you get 2 solutions, if it is 0 you get 1 solution, if it is negative you get 0 solutions. However, you can think of the 1 solution case as
two solutions that just happen to be equal to each other. If you use complex numbers, even the negative/0 solutions case becomes again
two solutions, just requiring an "imaginary" component. So with complex numbers this thing that had 3 different types of outcome now only has 1. This kind of uniformity is part of why complex numbers can be very useful.
So... okay maybe it doesn't immediately sound useful for a quadratic, but as soon as you want to solve cubic (
x^{3}) or quartic (
x^{4}) equations, you'll discover that the "equivalent" to the quadratic formula for them is
maddeningly complicated. Complex analysis becomes a light leading out of the tunnel for this.
There's all sorts of useful things that come out of complex numbers, particularly to do with exponents, and periodic functions like sine and cosine fit in here as well in ways that might surprise you. It becomes a
very good way at looking at a lot of problems that aren't obvious at all when you first hear about
i.
calima wrote:
Nothing, it's a regular 2d vector.
The thing that makes a complex number different than a 2D vector is that you can
multiply two complex numbers (and all the consequences that carry on from that). 2D vectors can be multiplied (
scaled) by a scalar (single value), but not by another vector. Everything that follows from this is what makes complex numbers useful for things that 2D vectors alone are not.