PyCalc

Calculate better

PyCalc Help

Matrix Mode


This section is for people who are familiar with matrix operations. If that topic is new to you, then it would be best to start with some primary educational source on the topic — perhaps a Khan Academy primer.

PyCalc supports matrix operations and linear algebra. Natively, Python interprets bracketed expressions ([1, 2, 3]) as Python lists. In order to make it easier to work with matrices, PyCalc will instead interpret bracketed expressions as matrices when Matrix Mode is enabled. Matrix Mode can be enabled in Settings, or by long-pressing the Matrix Mode Indicator on the main page:

Matrix Mode DisabledMatrix Mode Disabled
Matrix Mode EnabledMatrix Mode Enabled

A few simple examples will help illustrate the usage:

Column VectorColumn Vector
Row VectorRow Vector
3x3 MatrixMatrix

You can work with matrices in many of the ways you would expect. For instance, if you define a like:

a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]

then the following operations are all supported:

Scalar MultiplicationScalar Multiplication
Matrix AdditionMatrix Addition
Matrix SubtractionMatrix Subtraction
Matrix MultiplicationMatrix Multiplication
Matrix ExponentiationMatrix Exponentiation
Matrix InversionMatrix Inversion
Matrix TranspositionMatrix Transposition

The following special functions are also available:

NxN Zeros MatrixZeros Matrix
NxN Ones MatrixOnes Matrix
NxN Identity MatrixIdentity Matrix
Diagonal MatrixDiagonal Matrix

And of course, the basic matrix operations can be combined into more complicated expressions:

Complicated Matrix Expression

The above primer on matrices just scratches the surface of what's possible. See this page to dig deeper.