Math Notebook

An online math notebook where every line is typeset like a textbook: write expressions, variables and functions, and see exact fractions, matrices, units and complex numbers as beautiful formulas. Matrices are edited in spreadsheet grids (paste from Excel), results recalculate as you type, and any line can be copied as LaTeX or the whole notebook as Markdown.

About this tool

What is the Math Notebook?

A calculator and a math notebook in one. Each line is an expression such as x = inv(A) * b or f(t) = t^2 + 1/3. When you leave the line it turns into a typeset formula, and its result appears next to it. Change anything and every line below is recalculated, so the notebook always stays consistent, like a spreadsheet for formulas.

Calculations are exact whenever possible: 1/3 + 1/6 gives 1/2, and the inverse of a matrix is shown with fractions. Lines that need irrational numbers, such as sqrt(2) or sin(pi/7), are calculated with decimals and marked with ≈.

How to use

  1. Click a line and type an expression. Press Enter to evaluate it and move to the next line, Ctrl+Enter (Cmd+Enter on a Mac) to insert a new line below, ↑ / ↓ to move between lines and Esc to stop editing. The + icon on a line also inserts a line below it.
  2. Assign variables (r = 3) and define functions (area(r) = pi * r^2), then use them in later lines.
  3. Write matrices like any other line, for example A = [2, 1; 1, 3], or click Matrix to add one. Click Edit in sheet to edit it in a spreadsheet grid (paste from Excel works, empty cells count as 0); the line is rewritten as you edit. Use the name in any expression: det(A), A^-1, A' * A.
  4. Click Note to add text. Notes support Markdown and inline math such as $e^{i\pi} + 1 = 0$.
  5. Use the icons on a line to copy it as LaTeX, move it or delete it. Copy as Markdown copies the whole notebook with $$…$$ formulas for GitHub, Notion, Obsidian or a paper draft.

What you can calculate

CategoryExamples
Arithmetic and fractions1/3 + 1/6, 2^10, 7 mod 3, gcd(12, 18), 5!
Functionssqrt(2), sin(pi/6), log(100, 10), exp(1), abs(-3)
Variables and user functionsr = 3, area(r) = pi * r^2, area(2)
Matrices and vectors[1, 2; 3, 4], inv(A), det(A), A' (transpose), A * B, eigs(A), cross([1,0,0], [0,1,0])
Units5 cm + 2 inch to mm, 3 kg * 9.8 m/s^2, 60 km/h to m/s
Complex numberssqrt(-4), (1 + 2i) * (3 - i), e^(i * pi)
Calculus helpersderivative("x^3 + 2x", "x"), simplify("2x + 3x")

Click Copy as variable next to any result to turn it into a new line such as c = 1/2, d = 100.8 mm or B = [1/5; 3/5], keeping exact fractions and every digit. Matrices copied this way can be edited in a sheet.

Features

  • Typeset formulas for every input and result, with fractions, roots, exponents and matrices
  • Matrices in spreadsheet grids: any matrix written as […] can be edited in a grid that accepts paste from Excel and Google Sheets, and the line is rewritten for you
  • Exact arithmetic with fractions, falling back to decimals only where needed (≈)
  • Live recalculation of every line that depends on what you changed
  • Variables panel listing every variable and function with its current value
  • LaTeX and Markdown export of single lines or the whole notebook
  • The notebook is saved in your browser and comes back when you return

FAQ

How do I write a matrix without the grid?

Use brackets with commas between columns and semicolons between rows: [1, 2; 3, 4]. A column vector is [1; 2; 3].

Why is a result shown with ≈?

The calculation needed an irrational number (a square root, π, a trigonometric function …), so it was done with decimals instead of exact fractions. Switch to Decimal to see every result as a decimal.

Can I use the formulas in LaTeX documents?

Yes. Each line has a Copy LaTeX button, and Copy as Markdown exports everything with $$ blocks that LaTeX, Overleaf, Obsidian and many Markdown editors understand.