Symbolic Geometric Algebra/Calculus package for SymPy.

PyPI PyPI - Python Version Build Status on CircleCI Documentation Status DOI

Development Status

PyPI - Status GitHub contributors Codecov Language grade: Python Maintainability

brombo/galgebra was originally written by Alan Bromborsky, but was no longer actively maintained, and as of 2019-11-25 no longer exists.

pygae/galgebra is a community fork, maintained by Pythonic Geometric Algebra Enthusiasts.

The fork supports Python 3, increases test coverage, set up CI and linters, maintains releases to PyPI, improves docs and has many bug fixes, see Changelog.


Geometric Algebra

  • Arbitrary Vector Basis and Metric

  • Scalar, Vector, Bivector, Multivector, Pseudoscalar, Spinor, Blade

  • Basic Geometic Algebra Operations

    • Sum Difference

    • Geometric Product

    • Outer and Inner Products

    • Left and Right Contractions

    • Reverse, Dual, Exponential

    • Commutator

    • Projection, Reflection, Rotation

    • Reciprocal Frames

  • Inspecting Base/Blade Representation

  • Symbolic Manipulations

    • expand, factor, simplify, subs, trigsimp etc.

Overloaded Python operators for basic GA operations:

Geometric Calculus

  • Geometric Derivative

  • Submanifolds

  • Linear Transformations

  • Differential Operators

The various derivatives of a multivector function is accomplished by multiplying the gradient operator vector with the function:

Tip: an example for getting grad and rgrad of a 3-d Euclidean geometric algebra in rectangular coordinates:

from sympy import symbols
from import Ga

o3d = Ga('e', g=[1,1,1], coords=symbols('x,y,z',real=True))
(grad,rgrad) = o3d.grads()


  • Enhanced Console Printing

  • Latex Printing

    • out-of-the-box support for Jupyter Notebook

    • PDF generation and croping support if you have pdflatex/pdfcrop installed

Indices and tables