# Overview

Math Notepad is an editor for your day-to-day mathematical calculations. It is designed for engineers, students, and pupils. The application is a web based notepad where you can enter editable expressions. The results are displayed right below an expression. After a change, all dependent calculations are updated automatically.

This overview describes:

## Functions and operators

Math Notepad supports all common functions (such as `sin`, `sqrt`, `exp`) and operators (such as `a + b`, `a - b`, `a * b`, `a / b`). Parts of the expression can be enclosed in brackets `(...)` to override the default order of calculation.

It is possible to define custom functions. Functions can be defined with zero, one, or multiple variables.

## Variables and constants

Math Notepad supports math constants like `pi` and `e`.

New variables can be defined using the assignment operator.

## Algebra

Math Notepad has built-in support for symbolic computation (CAS). It can parse expressions into an expression tree and do algebraic operations like simplification and derivation on the tree.

The function `simplify` simplifies an expression tree:

The function `derivative` finds the symbolic derivative of an expression:

## Graphs

Graphs can be plotted using the function `plot`. A graph can be moved and zoomed by dragging and scrolling inside the graph. A plot can be created with one or multiple functions. It is not needed to specify the name of the variable to be used at the horizontal axis, though it is possible to put the variable name as last parameter in the plot function in case the variable is already defined in the editor.

## Numbers

Math Notepad supports floating point numbers. Numbers can be denoted in scientific notation.

## Complex Numbers

Complex numbers can be created using the imaginary unit `i`. Complex numbers are supported in all relevant functions.

## Matrices

Math Notepad supports n-dimensional matrices. A matrix is enclosed by square brackets. Values are separated by a comma, and rows by a semicolon. A subset of a matrix can be retrieved by specifying an index between square brackets `matrix[...]`, and similarly, a subset can be replaced by assigning a new matrix to a subset of a matrix, `matrix[...] = [...]`

Matrix indexes are one-based, and both lower-bound and upper-bound of index ranges are included. This is similar to how most mathematical applications work.

Note that Math Notepad works well with reasonably small matrices, but is not suitable for heavy computations with large matrices.

## Units

Math Notepad supports units. Units can be used in basic arithmetic operations like add and subtract, and units can be converted from one to another. An overview of all available units can be found on page Units.

## Strings

Strings are enclosed by double quotes `"`. Strings can be concatenated by adding them. Parts of a string can be retrieved or replaced by using indexes. Strings can be converted to a number using function `number`, and numbers can be converted to a string using function `string`.

Comments can be added to explain or describe calculations in text. A comment starts with a sharp sign character `#`, and ends at the end of the line. A line can contain a comment only, or can contain an expression followed by a comment.