Instead of having a function with two parameters, there are usually two functions. The first function acts on the location vector, returning a value b. The second function takes this b and v as parameters and returns a.

Traditionally b is a pseudovector called the value of the magnetic field, and the second function is the cross product. This works only in 3D. Instead, we will demonstrate a method that works in any number of dimensions in which there are electric charges and special relativity holds. Special relativity is essentially (1+1)-dimensional -- the other two dimensions are largely irrelevant -- so it is most reasonable to expect relativity to hold in any number of dimensions.

In http://physics.weber.edu/schroeder/mrr/MRRtalk.html it may be seen that magnetism is a direct result of special relativity. It is possible to figure out that magnetism is essentially planar. It is a sort of correction to the electric field due to relativistic effects. The plane of magnetism includes three points: the location of the charge that is making the field, the location where that charge soon will be due to its motion, and the location of the charged particle that is going to be affected by the field.

In geometric algebra that plane is defined by a bivector that we'll call B. A bivector is an ordered pair of vectors that define a plane combined with a scalar. All the detail may be found at http://faculty.luther.edu/~macdonal/GA&GC.pdf or https://archive.org/details/arxiv-1205.5935. We are going to make everything as simple and down-to-earth as possible here, so all we will worry about are a space which includes orthonormal basis vectors e

_{1},e

_{2}...e

_{N}. Then in 3D the basis of the bivector space may be e

_{1}e

_{2}, e

_{3}e

_{1}, e

_{2}e

_{3}. (We chose e

_{3}e

_{1}instead of e

_{1}e

_{3}so that the result will resemble the cross product.) Bivectors add together very much as ordinary vectors do, and multiplying by a scalar also works the same. The trickery comes with multiplying an ordinary vector times a bivector. There are three ways to do this, but all we need here is the inner product which we'll denote as |. That is, v|B is geometric algebra's inner product of a vector v with a bivector B. We are going to show that in 3D it can work the same as the cross product.

Let's say that the magnetic field vector we are interested in is b = [ c

_{1}e

_{1}, c

_{2}e

_{2}, c

_{3}e

_{3}], and the vector v is [ ae

_{1}, be

_{2}, ce

_{3}]. Then the cross product is

v x b =

[

(cc

_{2}- bc

_{3})e

_{1},

(ac

_{3}- cc

_{1})e

_{2},

(bc

_{1}- ac

_{2})e

_{3}

]

In the bivector version v is slightly different, it is ae

_{1}+ be

_{2}+ ce

_{3}. The magnetic field bivector is B = c

_{12}e

_{1}e

_{2}+c

_{31}e

_{3}e

_{1}+c

_{23}e

_{2}e

_{3}. We claim that the result is

v|B =

(cc

_{31}- bc

_{12})e

_{1}+

(ac

_{12}- cc

_{23})e

_{2}+

(bc

_{23}- ac

_{31})e

_{3}

Aside from superficial notational things, with

c

_{1}=c

_{23}

c

_{2}=c

_{31}

c

_{3}=c

_{12}

we see they are equivalent. So, how was this done? And why use c

_{31}instead of c

_{13}? We shall see.

It's too much to show all of geometric algebra, so we shall use only four properties. First is antisymmetry -- reversing the order of the vectors in a bivector reverses the sign.

e

_{i}e

_{j}= -e

_{j}e

_{i}.

Then

e

_{i}e

_{i}= -e

_{i}e

_{i}= 0.

The next is bilinearity of the inner product.

av|cB = cv|aB = acv|B = v|acB etc.

(v

_{1}+ v

_{2})|B = v

_{1}|B + v

_{2}|B

v|(B

_{1}+B

_{2}) = v|B

_{1}+ v|B

_{2}

The next two properties are true only for orthogonal vectors, but that is all we are concerned about here. These are:

If all three vectors are distinct then this inner product is zero.

e

_{i}|e

_{j}e

_{k}= 0 iff i<>j, i<>k, j<>k.

If the vector e

_{i}is the same as the first vector of the bivector then this pair vanishes, leaving the third vector.

e

_{i}|e

_{i}e

_{j}= e

_{j}

Combining with antisymmetry we then have

e

_{i}|e

_{j}e

_{i}= - e

_{j}

We shall do the 2D case first as a sort of warmup.

In 2D:

In 2D the bivector field has the basis e

_{1}e

_{2}. As there is only one plane possible in 2D, the only possible values for the magnetic field bivector are ce

_{1}e

_{2}with c a scalar.

v = ae

_{1}+ be

_{2}

B = ce

_{1}e

_{2}

v|B = (ae

_{1}+ be

_{2})|ce

_{1}e

_{2}

= c(ae

_{1}|e

_{1}e

_{2}+ be

_{2}|e

_{1}e

_{2})

= c(ae

_{1}|e

_{1}e

_{2}- be

_{2}|e

_{2}e

_{1})

= c(ae

_{2}- be

_{1})

The resulting acceleration vector in 2D is the velocity vector of the charged particle multiplied by c and rotated 90 degrees. Note that this is isomorphic to multiplying a complex vector by ci.

In 3D:

v = ae

_{1}+ be

_{2}+ ce

_{3}

B = c

_{12}e

_{1}e

_{2}+c

_{31}e

_{3}e

_{1}+c

_{23}e

_{2}e

_{3}

v|B = (ae

_{1}+ be

_{2}+ ce

_{3})|(c

_{12}e

_{1}e

_{2}+c

_{31}e

_{3}e

_{1}+c

_{23}e

_{2}e

_{3})

=

ae

_{1}|c

_{12}e

_{1}e

_{2}+ ae

_{1}|c

_{31}e

_{3}e

_{1}+ ae

_{1}|c

_{23}e

_{2}e

_{3}+

be

_{2}|c

_{12}e

_{1}e

_{2}+ be

_{2}|c

_{31}e

_{3}e

_{1}+ be

_{2}|c

_{23}e

_{2}e

_{3}+

ce

_{3}|c

_{12}e

_{1}e

_{2}+ ce

_{3}|c

_{31}e

_{3}e

_{1}+ ce

_{3}|c

_{23}e

_{2}e

_{3}

=

ac

_{12}e

_{1}|e

_{1}e

_{2}- ac

_{31}e

_{1}|e

_{1}e

_{3}+ ac

_{23}e

_{1}|e

_{2}e

_{3}-

bc

_{12}e

_{2}|e

_{2}e

_{1}+ bc

_{31}e

_{2}|e

_{3}e

_{1}+ bc

_{23}e

_{2}|e

_{2}e

_{3}+

cc

_{12}e

_{3}|e

_{1}e

_{2}+ cc

_{31}e

_{3}|e

_{3}e

_{1}- cc

_{23}e

_{3}|e

_{3}e

_{2}

=

ac

_{12}e

_{2}- ac

_{31}e

_{3}-

bc

_{12}e

_{1}+ bc

_{23}e

_{3}+

cc

_{31}e

_{1}- cc

_{23}e

_{2}

=

(cc

_{31}- bc

_{12})e

_{1}+

(ac

_{12}- cc

_{23})e

_{2}+

(bc

_{23}- ac

_{31})e

_{3}

This is a thinly disguised version of the traditional result of the cross product which is

v x b =

[

(cc

_{31}- bc

_{12})e

_{1},

(ac

_{12}- cc

_{23})e

_{2},

(bc

_{23}- ac

_{31})e

_{3}

]

Q.E.D. In 3D v|B is equivalent to v x b.

Use of e

_{1}e

_{3}as a basis vector for the bivectors instead of e

_{3}e

_{1}results in a formula that is less familiar but remains correct. As we shall see, this is more natural.

v|B =

(-bc

_{12}- cc

_{13})e

_{1}+

( ac

_{12}- cc

_{23})e

_{2}+

( ac

_{13}+ bc

_{23})e

_{3}

In 4D:

We may continue as above with six bivectors as a basis for the bivector subfield of the algebra. With

v = ae

_{1}+ be

_{2}+ ce

_{3}+ de

_{4}

B = c

_{12}e

_{1}e

_{2}+c

_{13}e

_{1}e

_{3}+c

_{14}e

_{1}e

_{4}+c

_{23}e

_{2}e

_{3}+c

_{24}e

_{2}e

_{4}+c

_{34}e

_{3}e

_{4}

the result of a calculation similar to that of the 3D case is

v|B =

(-bc

_{12}- cc

_{13}- dc

_{14})e

_{1}+

( ac

_{12}- cc

_{23}- dc

_{24})e

_{2}+

( ac

_{13}+ bc

_{23}- dc

_{34})e

_{3}+

( ac

_{14}+ bc

_{24}+ cc

_{34})e

_{4}

5D:

v = ae

_{1}+ be

_{2}+ ce

_{3}+ de

_{4}+ ee

_{5}

v|B =

(-bc

_{12}- cc

_{13}- dc

_{14}- ec

_{15})e

_{1}+

( ac

_{12}- cc

_{23}- dc

_{24}- ec

_{25})e

_{2}+

( ac

_{13}+ bc

_{23}- dc

_{34}- ec

_{35})e

_{3}+

( ac

_{14}+ bc

_{24}+ cc

_{34}- ec

_{45})e

_{4}+

( ac

_{15}+ bc

_{25}+ cc

_{35}+ dc

_{45})e

_{5}

and a pattern becomes evident.

v|B =

(0 -bc

_{12}- cc

_{13}- dc

_{14}- ec

_{15})e

_{1}+

( ac

_{12}+ 0 - cc

_{23}- dc

_{24}- ec

_{25})e

_{2}+

( ac

_{13}+ bc

_{23}+ 0 - dc

_{34}- ec

_{35})e

_{3}+

( ac

_{14}+ bc

_{24}+ cc

_{34}+ 0 - ec

_{45})e

_{4}+

( ac

_{15}+ bc

_{25}+ cc

_{35}+ dc

_{45}+ 0)e

_{5}

Using this pattern, we may return to 3D and rewrite it similarly as

v|B =

(0 - bc

_{12}- cc

_{13})e

_{1}+

(ac

_{12}+ 0 - cc

_{23})e

_{2}+

(ac

_{13}+ bc

_{23}+ 0)e

_{3}

A further simplification is possible as the product of a row vector e, a matrix M, and a column vector a.

e = [ e1 e2 e3 ]

M =

[

0 -c

_{12}-c

_{13}

c

_{12}0 -c

_{23}

c

_{13}c

_{23}0

]

a = [ a b c ]

v|B = eMa

Note that M is an antisymmetric matrix.

This pattern holds in any positive number of dimensions, even 1D where M = [0] and there is no magnetic field at all.