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 Disabled | |
Matrix Mode Enabled |
A few simple examples will help illustrate the usage:
Column Vector | |
Row Vector | |
3x3 Matrix |
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 Multiplication | |
Matrix Addition | |
Matrix Subtraction | |
Matrix Multiplication | |
Matrix Exponentiation | |
Matrix Inversion | |
Matrix Transposition |
The following special functions are also available:
NxN Zeros Matrix | |
NxN Ones Matrix | |
NxN Identity Matrix | |
Diagonal Matrix |
And of course, the basic matrix operations can be combined into more complicated expressions:
The above primer on matrices just scratches the surface of what's possible. See this page to dig deeper.