SageMath Open-source mathematical computing system integrating symbolic, numerical and algebraic tools through Python-based interfaces.
Overview SageMath is a free mathematical computing system that brings multiple open-source packages into a shared Python-based environment. It supports symbolic and numerical work through libraries, an interactive shell and notebook workflows. Its integrated distribution is distinct from a single symbolic library, while platform setup and object types remain important parts of using it reliably.[1] [2] [4]
Contents Integrated mathematical work SageMath combines components including NumPy, SciPy, SymPy, Maxima and specialized algebra systems. Its calculus tutorial demonstrates equation solving, differentiation, integration and differential equations; some operations call an underlying package such as Maxima. The common interface therefore coordinates several implementations rather than making every result originate from one engine. Knowing the relevant object and backend helps when interpreting documentation or reproducing a computation.[1] [5]
Sage syntax and Python Sage input is Python-based, but a preparsing step changes some notation and numeric literals. For example, the documentation shows a fractional literal converted to operations on Sage integers and a caret exponent converted to Python's exponent operator. Consequently, code copied between a Sage cell and an ordinary Python file may need adjustment. Similar-looking syntax is not sufficient to guarantee the same types or numerical behavior.[3]
Saving mathematical objects The tutorial describes compressed object files and session dictionaries for preserving values. Many objects retain cached calculations, but objects tied to some external algebra sessions may reload as invalid. Cross-version loading also depends on the relevant class definitions still being available. This makes saved objects useful working artifacts, while executable source and the software environment remain important for longer-term reproducibility.[4]
Restoring a session Loading a saved session merges its variables into the current session rather than first clearing existing definitions. Variables that could not be saved may be absent. A session log is another mechanism: it records instructions that can be replayed, rather than necessarily preserving the same cached state. A shared computation should identify which of these artifacts it supplies and what must be reconstructed.[4]
Installation and hosted options The installation guide offers Linux distribution or conda-forge routes and a self-contained Mac build or conda-forge installation. On Windows, it directs users through WSL and a Linux environment. Notebook use involves Jupyter and the Sage kernel. Separately, the guide lists hosted options such as a free quick-computation service and commercial CoCalc; their service arrangements should not be confused with the free local software license.[1] [2]
Substitution considerations SageMath can substitute for Wolfram Mathematica for supported algebraic, symbolic and numerical work when a Python-based environment fits the task. It does not establish direct execution of Wolfram Language programs or preservation of Mathematica notebook interfaces. A transition should recreate the calculation in the appropriate Sage types and retain the source, assumptions and environment needed to rerun it.[1] [3] [4] [5] [6]
Also included: 4 capabilities and 0 substitute relationships. Check substitutes in section 1 and capabilities in section 3.