Galileo

Math you can play with, right in your browser.

Galileo is a small, free computer algebra system. Solve equations, take derivatives, factor big numbers, draw fractals and 3D surfaces, and learn as you go with interactive lessons. Nothing to install: everything runs on your own device.

Try: solve(x^2 - x - 1, x) · factor(2^67 - 1) · mandelbrot(…) · plot3d(sin(x)*cos(y), …)

The Galileo playground showing a derivative, a symbolic matrix inverse and an interactive 3D surface

What it does

Type math the way you would write it. Answers are exact, and every result is shown.

Exact answers, digits on request

Answers are exact: 1/3 + 2/6 is 2/3. eval gives digits, and calc = "eval" gives them every time.

1/3 + 2/6
eval(1/3 + 2/6)
calc = "eval"

Algebra and calculus

Exact fractions, derivatives, expansion, factoring and simplification.

deriv(x^3*sin(x), x)
simplify(sin(y)^2 + cos(y)^2)

Symbolic matrices

Inverses, determinants, LU and solving, with symbols inside.

inv([a b; c d])
det([1 x; x 1])

Plots in 2D and 3D

Functions, parametric curves and surfaces you can rotate and zoom.

surface((2+cos(v))*cos(u), (2+cos(v))*sin(u),
  sin(v), u, 0, 2*pi, v, 0, 2*pi)

Primes and big numbers

Whole numbers of any size, primality tests and fast factoring.

factor(2^67 - 1)
isprime(2^127 - 1)

Learn by doing

Interactive lessons: read, change the code, press Run. Start with Foundations if you like, or jump to whatever catches your eye. School math is enough to begin.

Foundations

Ten lessons: how Galileo works out answers, then arithmetic to calculus, differential equations and conic sections. Start here.

  1. Simplify and eval
  2. Numbers and arithmetic
  3. Algebra
  4. Functions and graphs
  5. Polynomials
  6. Trigonometry
  7. Complex numbers
  8. Calculus
  9. Differential equations
  10. Geometry and conic sections

Linear algebra

Nine lessons for a first course: vectors and matrices, elimination and LU, vector spaces, determinants, least squares and QR, eigenvalues, symmetric matrices and Cholesky, the SVD, and the matrix exponential with the Jordan form.

  1. Simplify and eval
  2. Vectors and matrices
  3. Linear systems and elimination
  4. Vector spaces, bases and dimension
  5. Determinants
  6. Orthogonality, projections and least squares
  7. Eigenvalues and eigenvectors
  8. Symmetric matrices and positive definiteness
  9. The singular value decomposition
  10. Linear differential equations, the matrix exponential and the Jordan form

Differential equations

Eight lessons for a first course: slope fields and separable equations, linear equations, oscillations and resonance, Laplace transforms with switches and hammer blows, the phase plane, series solutions, Fourier series, and the heat and wave equations.

  1. Simplify and eval
  2. First-order equations, slope fields and equilibria
  3. Linear first-order equations
  4. Second-order equations, oscillations and resonance
  5. Laplace transforms, switches and hammer blows
  6. Systems and the phase plane
  7. Series solutions
  8. Fourier series
  9. Heat, waves and potentials

Probability and statistics

Eight lessons for a first course: describing data, probability by counting and simulation, discrete and continuous distributions, the central limit theorem, confidence intervals, hypothesis tests, and regression.

  1. Simplify and eval
  2. Describing data
  3. Probability and simulation
  4. Discrete distributions
  5. Continuous distributions
  6. Sampling and the central limit theorem
  7. Estimation and confidence intervals
  8. Hypothesis tests
  9. Regression and correlation

Multivariable calculus

Seven lessons for Calculus III: contour maps, gradients, optimization and Lagrange multipliers, multiple integrals and the bell curve, vector fields, and the theorems of Green, Stokes and Gauss.

  1. Simplify and eval
  2. Functions of two variables
  3. Partial derivatives and the gradient
  4. Optimization
  5. Lagrange multipliers
  6. Multiple integrals and the bell curve
  7. Vector fields and line integrals
  8. Green, Stokes and Gauss

Complex analysis

Eight lessons for a first course: pictures of complex functions, analytic functions, contour integrals, Cauchy's theorem, Taylor and Laurent series, residues, real integrals by residues, and conformal maps with the flow around a wing.

  1. Simplify and eval
  2. Complex functions and how to picture them
  3. Analytic functions and the Cauchy–Riemann equations
  4. Contour integrals
  5. Cauchy's theorem and the integral formula
  6. Taylor and Laurent series
  7. The residue theorem
  8. Real integrals by residues
  9. Conformal maps and the flow around a wing

Number theory

Primes, factoring large numbers, algebraic factoring and hunting for identities, modular arithmetic, the cryptography built on them, a lab that searches for new factoring algorithms, and the number field sieve.

  1. Simplify and eval
  2. Divisibility and primes
  3. Prime factoring
  4. Algebraic factoring
  5. Modular arithmetic
  6. Cryptography
  7. The factoring lab
  8. The number field sieve

Graphs and networks

Three lessons: Euler's bridges and tours, shortest routes, spanning trees, flows and matchings, then scheduling by coloring, PageRank, the rise of the Medici and random graphs.

  1. Simplify and eval
  2. Graphs, degrees and tours
  3. Shortest paths, trees, flows and matchings
  4. Colorings, orderings and real networks

Random processes

Three lessons: Markov chains and the gambler's ruin, random walks and Brownian motion, then noisy differential equations, option prices and the phase transition of a magnet.

  1. Simplify and eval
  2. Markov chains
  3. Random walks, Brownian motion and arrivals
  4. Stochastic differential equations, options and magnets

Partial differential equations

Three lessons: how a rod cools and why simulations can explode, waves on a guitar string and its overtones, then steady temperatures, soap films and membranes.

  1. Simplify and eval
  2. The heat equation
  3. Waves on a string
  4. Laplace and Poisson

Calculus of variations

Three lessons: the fastest slide and the cycloid, hanging chains and soap films, and the principle of least action from Newton's law to the chaotic double pendulum.

  1. Simplify and eval
  2. Shortest paths and the fastest slide
  3. Hanging chains and soap films
  4. The principle of least action

Group theory

Ten lessons: symmetry, cyclic groups, permutations and Lagrange's theorem, groups as objects, rings and finite fields, Galois theory and quaternions, counting with symmetry, polynomials over finite fields, ruler and compass, and error-correcting codes.

  1. Simplify and eval
  2. Symmetry
  3. Cyclic groups
  4. Permutations and Lagrange's theorem
  5. Groups as objects
  6. Rings and fields
  7. Galois and symmetry
  8. Group actions and counting
  9. Polynomials over fields
  10. Ruler and compass
  11. Error-correcting codes

Chaos and fractals

The logistic map, bifurcations, the Lorenz butterfly, the Mandelbrot set and Julia sets.

  1. Simplify and eval
  2. Chaos
  3. Fractals

Mechanics

Seven lessons for a first physics course: Newton's laws with units and air drag, energy and rockets, rotation and the spinning top, orbits and the three-body problem, Lagrangian and Hamiltonian mechanics with the double pendulum, and rotating frames with Foucault's pendulum.

  1. Simplify and eval
  2. Motion and Newton's laws
  3. Energy and momentum
  4. Rotation
  5. Gravity and orbits
  6. Lagrangian mechanics
  7. Hamiltonian mechanics and phase space
  8. Rigid bodies and non-inertial frames

Oscillations and waves

Seven lessons: the harmonic oscillator and resonance, coupled oscillators and normal modes, strings and Fourier series, sound and the Fourier transform, dispersion and wave packets, interference and diffraction of light, and geometric optics with the rainbow.

  1. Simplify and eval
  2. The harmonic oscillator
  3. Coupled oscillators
  4. The wave equation
  5. Sound and the Fourier transform
  6. Dispersion
  7. Light as a wave
  8. Geometric optics

Reading research papers

Recent papers built from the ground up: quantum gravity from the null cone (arXiv:2611.34924), from black hole entropy to causal diamonds, focusing and the clock states.

  1. Reading a paper: quantum gravity from the null cone

Discovering physical laws

Four lessons that find Kepler's and Newton's laws in planet data, then the term Einstein added for Mercury.

  1. Simplify and eval
  2. Kepler's third law from planet data
  3. From Kepler to Newton
  4. Mercury doesn't fit
  5. Deriving the precession

Two ways to use it online, two to install

Playground

A light REPL with lessons. Works well on a phone.

JupyterLite

Full JupyterLab in the browser with the Galileo kernel. Your notebooks are saved in the browser.

Docker

JupyterLab with the Galileo kernel.

docker run -p 8888:8888 cascala/igalileo

From source

The command-line REPL.

cargo install --git \
  https://github.com/cascala/galileo