Higher dimensional cross product in LinearAlgebra

Dual vectetors and pseudovectors arent the same thing by the way.

1 Like

Speaking for the wedge product in geometric algebra. GA typically doesn’t use covectors, what @Mason refers to a dual vectors. The basis would be present in a very concrete form rather than implied by position and type of array.

GA is most efficient with a dedicated package where something like (1.0e₁ + 2.0e₂) ∧ 3.0e₃ is recognized. However you could do GA using Array and standard operators. For example, you can replace each of the eᵢ basis 1-blades with the pauli matrices. In that case you’d want to do the right thing. I think I’m making a case for defining in terms of other operators. In this case I’m defining it using the geometric product, where the geometric product is the standard Matrix-Matrix product.

julia> ∧(a,b) = 0.5*(a*b - b*a)
∧ (generic function with 1 method)

julia> ga = ((1.0e₁+2.0e₂)∧3.0e₃)*(1.0e₁∧1.0e₃)
Multivector{Float64,2}
⟨-3.0⟩₀ + ⟨6.0e₁₂⟩₂

julia> la = ((1.0σ₁+2.0σ₂)∧3.0σ₃)*(1.0σ₁∧1.0σ₃)
2×2 Array{Complex{Float64},2}:
 -3.0+6.0im   0.0+0.0im
  0.0+0.0im  -3.0-6.0im

julia> la == -3.0I + 6.0*σ₁∧σ₂
true
1 Like

That’s the Weyl matrix representation of a Clifford algebra and is something entirely different. The question here was whether wedge products of n vectors that don’t have a type wrapper should return an n-dimensional antisymmetric tensor (or more generally, whether wedge products should be indexable as such).

In that case, covariance vs contravariance matters. The Weyl representation on the other hand would represents our original set of vectors (and arbitrary Clifford basis elements) as matrices acting on a spinor representation.

I don’t think LinearAlgebra should support Clifford algebras/GA out of the box using the euclidean dot product as a default, because LinearAlgebra.dot() is not a quadratic form for Complex vectors (it takes the complex conjugate of the first vector) and so would break the algebra in that case, and if there is no natural choice of a default dot product, there’s a very wide range of choices of quadratic form that are all useful (for example, in real 4d, the metrics with signature + + + +, + + + -, and + + - - are all very commonly used). Better to leave that to packages.

However, all such packages could safely use/extend the LinearAlgebra wedge product though, since the wedge product is uniquely defined for any vector space without dependence on metric, and including it in the extended standard library would be for standardization between packages, and attempt to avoid a situation where people have to worry about whether they are importing PackageA.(∧) or PackageB.(∧) .

not suggesting this

what “those other operators” could be would require someone with knowledge of how tensors and geometric/clifford products are related.

I agree that any in base or LinearAlgebra should be as slim as possible and not make any assumptions. For example I’d prefer if ∧(a::Array, b::Array) wasn’t even implemented concretely, as it lacks context. Although it could be imagined to have a reasonable value under GA since it’s a metric independent operator. But yeah, supporting GA in LinearAlgebra would be madness.

1 Like

@chakravala replied to this post on Reddit:

https://www.reddit.com/r/Julia/comments/jbonra/higher_dimensional_cross_product_post_banned_on/

1 Like

(post deleted by author)