Reference

Documentation

Complete reference for all Numexa capabilities — web playground and Discord bot.

Quick Start

Numexa is powered by math.js. Open the Playground or use Discord slash commands to evaluate expressions.

// Arithmetic
2^10 + sqrt(144)          // 1036

// Trigonometry (radians)
sin(pi / 6)               // 0.5

// Derivatives
derivative(x^3 + 2*x, x)  // 3 * x ^ 2 + 2

// Matrices
inv([[1,2],[3,4]])         // [[-2,1],[1.5,-0.5]]

Operators

Operator Meaning Example
+ - * / Basic arithmetic 3 + 4 * 2
^ or ** Exponentiation 2^8
% Modulo 17 % 5
( ) Grouping (3+4)*2
i Imaginary unit 3+4i

Constants

Constant Value Try it
pi 3.14159265…
pi
e 2.71828182…
e
phi 1.61803… (golden ratio)
phi
tau 6.28318… (2π)
tau
Infinity
Infinity

Calculus

Symbolic differentiation using derivative(expr, variable).

Examples

derivative(x^4, x)              // 4 * x ^ 3
derivative(sin(x) * x, x)       // cos(x) * x + sin(x)
derivative(log(x^2), x)         // 2 / x
derivative(exp(x^2), x)         // exp(x ^ 2) * 2 * x

Numerical integration is planned for v1.3. For now, use the Playground to evaluate at specific values.

Linear Algebra

Matrices are expressed as nested arrays: [[row1], [row2], ...]

Supported Operations

inv([[1,2],[3,4]])               // Matrix inverse
det([[1,2],[3,4]])               // Determinant → -2
transpose([[1,2],[3,4]])         // Transpose
lusolve([[2,0],[0,3]], [4,9])    // Linear system solve
[[1,2],[3,4]] * [[5,6],[7,8]]    // Matrix multiply

Complex Numbers

Use i as the imaginary unit directly in expressions.

(3 + 4i) * (1 - 2i)             // 11 - 2i
abs(3 + 4i)                     // 5  (modulus)
exp(pi * i)                     // ≈ -1  (Euler's formula)
sqrt(-1)                        // i
conj(3 + 4i)                    // 3 - 4i

Statistics

Pass arrays using [a, b, c, ...] syntax.

mean([2, 4, 6, 8, 10])          // 6
std([2, 4, 6, 8, 10])           // 2.83...
variance([1, 2, 3])             // 0.667
median([5, 1, 9, 3])            // 4
combinations(10, 3)             // 120
factorial(12)                   // 479001600

Units & Conversion

Use to keyword for unit conversion. Supports full SI and imperial unit systems.

5 km to m                       // 5000 m
100 mph to km/h                 // 160.934...
1 kg to g                       // 1000 g
0 degC to degF                  // 32 degF
1 atm to Pa                     // 101325 Pa

Discord Commands

Command Description Status
/calc [expr] Evaluate any expression Core
/plot [fn] Plot a function f(x) Core
/derive [f] [x] Symbolic derivative New
/matrix [A] [op] Matrix operations Core
/convert [n] [u1] [u2] Unit conversion New
/integrate [f] [a] [b] Numerical integration v1.3
/help List all commands Core

Keyboard Shortcuts

Key Action
Enter Evaluate expression
↑ / ↓ Navigate history
Ctrl+L Clear output
Ctrl+K Focus input
Esc Cancel / clear input