ArticleslgStudy

computer science

SageMath

SageMath is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand SageMath rather than just read about it. In short: SageMath (previously Sage or SAGE, "System for Algebra and Geometry Experimentation") is a computer algebra system (CAS) with features covering many aspects of mathematics, including algebra, combinatorics, graph theory, group theory, differentiable manifolds, numerical analysis, number theory, calculus, and statistics. The first version of SageMath was released on 24 February 2005 as free and open-source software u…

SageMath — main illustration
SageMath — illustration

Key takeaways

  • SageMath belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect SageMath to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of SageMath from memory before moving on to harder problems.

Reference excerpt

SageMath (previously Sage or SAGE, "System for Algebra and Geometry Experimentation") is a computer algebra system (CAS) with features covering many aspects of mathematics, including algebra, combinatorics, graph theory, group theory, differentiable manifolds, numerical analysis, number theory, calculus, and statistics. The first version of SageMath was released on 24 February 2005 as free and open-source software under the terms of the GNU General Public License version 2, with the initial goals of creating an "open source alternative to Magma, Maple, Mathematica, and MATLAB". The originator and leader of the SageMath project, William Stein, was a mathematician at the University of Washington. SageMath uses a syntax resembling Python's, supporting procedural, functional, and object-oriented constructs.

Development

Stein realized when designing Sage that there were many open-source mathematics software packages already written in different languages, namely C, C++, Common Lisp, Fortran and Python. Rather than reinventing the wheel, Sage (which is written mostly in Python and Cython) integrates many specialized CAS software packages into a common interface, for which a user needs to know only Python. However, Sage contains hundreds of thousands of unique lines of code adding new functions and creating the interfaces among its components. SageMath uses both students and professionals for development. The development of SageMath is supported by both volunteer work and grants. However, it was not until 2016 that the first full-time Sage developer was hired (funded by an EU grant). The same year, Stein described his disappointment with a lack of academic funding and credentials for software development, citing it as the reason for his decision to leave his tenured academic position to work full-time on the project in a newly founded company, SageMath Inc.

Achievements 2007: first prize in the scientific software division of Les Trophées du Libre, an international competition for free software. 2012: one of the projects selected for the Google Summer of Code. 2013: ACM/SIGSAM Jenks Prize.

Licensing and availability SageMath is free software, distributed under the terms of the GNU General Public License version 3.

Windows SageMath 10.0 (May 2023) requires Windows Subsystem for Linux in version 2, which in turn requires Windows to run as a Hyper-V client. SageMath 8.0 (July 2017), with development funded by the OpenDreamKit project, successfully built on Cygwin, and a binary installer for 64-bit versions of Windows was available. Although Microsoft was sponsoring a Windows version of SageMath, prior to 2016 users of Windows had to use virtualization technology such as VirtualBox to run SageMath.

Linux SageMath is available as a package in some Linux distributions, including Arch Linux, Debian, Guix, Ubuntu and NixOS. In Gentoo, it is available via layman in the "sage-on-gentoo" overlay. The packages used by NixOS and Gnu Guix are available for use on other distributions, due to the distribution-agnostic nature of their package managers.

Other operating systems Gentoo prefix also provides Sage on other operating systems.

Software packages contained in SageMath The philosophy of SageMath is to use existing open-source libraries wherever they exist. Therefore, it uses many libraries from other projects.

See also

CoCalc Comparison of statistical packages List of computer algebra systems

References

External links

Official website

Illustrations

SageMath illustration
SageMath illustration
SageMath: William A. Stein, originator and leader of the SageMath project
William A. Stein, originator and leader of the SageMath project

Worked examples

Example 1 — a first encounter with SageMath

Start with the simplest possible case. Write down what SageMath claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to SageMath before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about SageMath ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of SageMath

In research
SageMath appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses SageMath in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
SageMath is common in secondary-school and first-year university syllabi. It links to neighbouring topics 2005 software, Computer algebra system software for Linux, Computer algebra system software for Windows, so understanding it makes those chapters shorter.
In everyday life
Look for SageMath outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “SageMath” →

How to study SageMath in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what SageMath means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain SageMath out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is SageMath in simple terms?

SageMath (previously Sage or SAGE, "System for Algebra and Geometry Experimentation") is a computer algebra system (CAS) with features covering many aspects of mathematics, including algebra, combinatorics, graph theory, group theory, differentiable manifolds, numerical analysis, number theory, cal…

Why does SageMath matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study SageMath?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on SageMath.

Tags

  • 2005 software
  • Computer algebra system software for Linux
  • Computer algebra system software for Windows
  • Computer algebra system software for macOS
  • Free and open-source Android software
  • Free computer algebra systems
  • Free educational software
  • Free mathematics software
  • Free software programmed in Python
  • Mathematical software
  • Python (programming language) scientific libraries

Keep exploring