# How do I simply express a canonical basis for G4 using Symbolics.jl

**URL:** <https://discourse.julialang.org/t/how-do-i-simply-express-a-canonical-basis-for-g4-using-symbolics-jl/67540>\
**Category:** General Usage\
**Tags:** symbolics, pluto-and-latex, geometric-algebra\
**Created:** [September 2, 2021, 3:34am UTC](https://discourse.julialang.org/t/how-do-i-simply-express-a-canonical-basis-for-g4-using-symbolics-jl/67540 "2021-09-02T03:34:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![banksiaboy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/banksiaboy/32/27032_2.png) [@banksiaboy](https://discourse.julialang.org/u/banksiaboy)\
**Post date:** [September 2, 2021, 3:34am UTC](https://discourse.julialang.org/t/how-do-i-simply-express-a-canonical-basis-for-g4-using-symbolics-jl/67540/1 "2021-09-02T03:34:26Z")

</div>

I am fumbling my way through learning basic Geometric Algebra. I want to bootstrap my understanding of using Symbolics.jl at the same time. I have some dumb questions about the mathematics, and usage of the Symbolics package.

If anyone knows a more appropriate forum - please advise…

I’m using [MacDonald’s A survey of geometric algebra and geometric calculus](https://idp.springer.com/authorize/casa?redirect_uri=https://link.springer.com/content/pdf/10.1007/s00006-016-0665-y.pdf&casa_token=t4kQRbVCwcQAAAAA:znHAA9ETLoxvM89GXem4yIxSc-KVRCYT6lVdWOkJmGmpZQguj7IkhFj9uZJX3C1Yor0CwEYwHwbjcsXjUKs) as one starting point. I’m aware of `Grassman.jl` - but I don’t want to drown.

I’d like to be able to generate variables to represent the canonical basis vectors as shown in the table. First step - just properly declared `Symbolics` variables, looking like nice math. I want to enjoy the result 🙂

 ![image](https://global.discourse-cdn.com/julialang/original/3X/7/8/786d8b4435667f43b0ca06b1c1027d428b699159.png)

1. I suppose I would really like an expression that would generate a zero-based array of length 5, containing the basis of vectors of order 0…4. as per the table.
2. What is the formal name for this kind of sub-setting? I can’t look it up without the name.
3. I’d like subscripts to work so that G4[1,1] gives e0
4. What LaTeX expressions should I use to get nice R and G for Reals and Geometrics in Pluto?

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [September 2, 2021, 9:36am UTC](https://discourse.julialang.org/t/how-do-i-simply-express-a-canonical-basis-for-g4-using-symbolics-jl/67540/2 "2021-09-02T09:36:13Z")

</div>

Someone could definitely make this. No one has though.

---

<div class="post-metadata">

**Author:** ![banksiaboy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/banksiaboy/32/27032_2.png) [@banksiaboy](https://discourse.julialang.org/u/banksiaboy)\
**Post date:** [September 3, 2021, 4:48am UTC](https://discourse.julialang.org/t/how-do-i-simply-express-a-canonical-basis-for-g4-using-symbolics-jl/67540/3 "2021-09-03T04:48:05Z")

</div>

I was worried I was asking a silly question 🙂  
How hard would it be to do? Is there anything like this I can look at to learn how to do it?
