Have you ever wondered why complex numbers exist? Have you ever wondered why the hell
j == square-root of -1? Were you ever dissatisfied by the explanation your math or engineering profs gave you in college? If you are mathematically inclined (you need to have studied a significant amount of college-level mathematics) and are curious about the way the world works, keep reading.
In math we have the concept of the real number line ... a bunch of numbers that lie in a straight line that stretches from negative infinity to positive infinity. These are 1-D numbers:
. . . . . - 3, -2, -1, 0, 1, 2, 3, . . . . . .
We can easily wrap our heads around this concept. Now, what if we consider 2-D numbers? Numbers that are simply a pair of "x-y" coordinates? Well, this was a little harder to grasp in highschool, but we still understood it relatively easily:
.
.
3
2
1
... -3, -2, -1, 0, 1, 2, 3 ...
-1
-2
-3
.
.
Perhaps we can call 2-D numbers the special word
2D vectors. Where a vector is simply two numbers: (x, y), where x denotes the horizontal portion of the vector, and y denotes the vertical portion.
Ok, so far so good. Hold on to your hats, we are about to get way more technical.
Consider what a "2D rotation" operation in computer graphics is: it is a linear transformation and hence can be represented as a matrix multiplication operation. It is well known that rotation by an angle theta in the 2D field is left-multiplication by this 2x2 matrix:
[ cos(theta) -sin(theta) ][ sin(theta) cos(theta) ]What if we set
theta == pi/2 ? (90 degrees counter-clockwise) then that matrix, call it A, becomes:
[ 0 -1]
[ 1 0]
Viola. Now we can rotate any point, (x, y), by left-multiplying it with this matrix A:
[ 0 -1] [x] == [w]
[ 1 0] [y] [z]
where (w, z) is the resultant vector after rotation.
Now, let's do something very common for square matrices: let's compute the eigen values for this matrix A:
Remember, the
eigen values of a matrix, are scalar values such that multiplying a vector by those scalar values is the same as multiplying that the matrix with that same vector.
In other words, the eigen values, are all values such that:
A
x = e
x
Where A is the matrix whose eigenvalues we are trying to find, and
e is the scalar eigen-value we are trying to solve for.
x is any non-null (non-zero) vector.
So, from that equation we have:
(A-eI)x = 0Where "I" is the 2x2 identity matrix.
Ok, since
x is not a zero vector, we have:
det(A - eI) = 0, or the determinant of
[ -e -1]
[1 -e] == 0
Now we have to simply find the roots of the
characteristic polynomial of this matrix, to find the value of e:
e^2 + 1 == 0, or
e = sqrt(-1)We have arrived at the most beautiful conclusion ever: without ever mentioning anything about complex numbers, abstract algebra, Abelian groups, Euler's formulae, etc, we find ourselves in need of defining the quantity sqrt(-1).
Again, remember what an eigen value really means in this situation: this is saying, to rotate a vector by 90 degrees in 2D-space we can either multiply by this well known matrix, A, or we can multiply by a mysterious quantity, sqrt(-1).
Of course, it makes sense that the eigen value for a rotation matrix wouldn't be a simple real scalar, since a real number multiplied with a vector would simply scale that vector's magnitude, not rotate it in any way. Cool eh?
We can see from this that the fact that j (or i) == sqrt(-1) is not merely a convention that some mathematician came up with ... it is a fundamental part of dealing with numbers. Much like how negative numbers were "discovered" at a point in time where they might have been seen as "useless".
So. How we find a mystery number, m, that when multiplied by itself twice gives us the sqrt(-1)? Easy. We think in two dimensions.
We are basically looking for
1 x m x m = -1The number 1 represented in 2 dimensions is the vector (0, 1). We know that the vector (0, -1) is the same as the vector (0, 1) but rotated 180 degrees. So, we rotate (0, 1) by 90 degrees twice to get to (0, -1). How do we "rotate by 90 degrees" again? Easy ... we just showed, it's by multiplying by "sqrt(-1)". Hence we have m = j. Or more clearly, the number that represents a 90 degree counter-clockwise rotation is simply this new construct "j".
One last question to take care of: Why can we use
j in normal algebraic equations and treat it just like any other ordinary number? Magic? No. The reason is subtle: We arrived at the need for a "real number that is equal to the sqrt(-1)" when we were figuring out the eigen value of that rotation Matrix A. Of course, no such number exists, but if it
did exist, then it just be yet another number! We can multiply/divide/add/subtract it just like we can multiply/divide/add/subtract the number 7. The only caveat is that is a
rotation and hence lives on a different (and orthogonal) axis to the real-number axis. No problem, we just have to start thinking in 2D when we need the concept of sqrt(-1). There is a very real connection though between j and the real numbers, and that connection is precisely that, when we square j (i.e. j^2), we get -1, a negative number that we are very familiar with.
That's it!
If you understood this post then congratualtions: you have just linked the two seemingly unrelated fields in mathematics: Linear Algebra, and Complex Algebra.
Until next time,
--Shafik