Geometric Algebra

From GPWiki

Files:GUITutorial_warn.gif The Game Programming Wiki has moved! Files:GUITutorial_warn.gif

The wiki is now hosted by GameDev.NET at wiki.gamedev.net. All gpwiki.org content has been moved to the new server.

However, the GPWiki forums are still active! Come say hello.

Tutorial by Nicholas Gorski GMan


This tutorial will discuss Geometric Algebra, its background, and its uses. A note: Geometric Algebra can contain some heavy math. If you do not understand the concept the first time, do not fret. Recall how long it took you to learn all you know now about math. You are about to learn an entirely different branch of math! So do not worry when you read it the first time and don't understand it all; I sure didn't!


Contents

Geometric Algebra

What is it?

Geometric Algebra, or GA, is a math that represents all geometric ideas. It is NOT linear algebra. Linear algebra is the algebra you learned, or are learning, in school:

2x+4=8
2x=4
x=2


Or perhaps:

y=2x-4
y+2x=0

Substitute:
(2x-4)+2x=0

Simplify:
4x-4=0
x=1

Substitute Again:
y=2x-4
y=2(1)-4
y=2-4
y=-2

x=1, y=-2


That is linear algebra. Geometric Algebra is an entirely different section of mathematics, based off complex numbers. It was first adopted into physics, and is slowly being realized into the computer science world.


Why do I care?

You care because, I say so, now care! Either that or once it settles in your brain, GA is a very elegant, clean, and simple way to program geometric algorithms. If you've ever taken a linear algebra course, or even just tried looking at it, you will burn your eyes out. Geometric Algebra is sexy math.


All joking set aside, GA is quickly becoming the 'new way' to do things with geometry. It really is quick and clean, OOP friendly, and does simplify the code you write. (Just imagine: easier debugging, less hassle, etc...) It encapsulates all sorts of math, including normal algebra, calculus, physics. In fact, you may also already know some GA! Quaternions: a common, popular, and proven way of representing rotations, is actually contained within Geometric Algebra, along with projections, intersection's, and more.


And for those who care, it unites the following spaces: Plückerspace, Euclidean, affine, projective, spherical, inverse, hyperbolic, and conformal.


Before I start

Before we dive into Geometric Algebra, I should point out that you do need to be comfortable with complex numbers and vectors. For those rusty:


\sqrt{4}=2

\sqrt{1}=1

\sqrt{0}=0

\sqrt{-1}=?


Nothing squared will equal a negative, so the imaginary system was created. The imaginary system is based of the number i, where i=\sqrt{-1}. Thus: i \times i=i^2=-1. Complex numbers are a mixture of real number's and i, such as:


5 + i

- 4i

- π + π

-2.234\ which\ is\ -2.234+0i


For vectors, take a lookie here.With that under your belt, you should be ready to try and take on Geometric Algebra.

The Series

This series of tutorials is meant to be read in order, from top to bottom. It is as follows:


Vector Space

Outer Product

Geometric Product

Contraction Product


Once again, don't feel afraid to reread these until you understand it. At the end of each article, there will be a link, for easier navigation.

<Vector Space>