חזרה לתוכן העניינים

# Operators and mathematical symbols

Naming rules for Mathematical Objects

Uppercase and lowercase letters are different everywhere. The user can give any names for mathematical objects. However, these names should not coincide with the operators and constants that are defined in the system. In addition, the names of objects, of which the multiplication is not commutative, for example, vectors and matrices, must begin with a capital Latin letters, and all other object names must start with lowercase letters. This makes it possible as soon as entering automatically get a simplified expression.

Here is a list of the main operators of the system Mathpar.

clean — clean input data (if this operator doesn't have arguments) or the date of arguments of this operator,

Infix arithmetic operators

- — subtraction;

/ — division;

* — multiplication (still a blank or absence of the operator);

times — noncommutative multiplication(still a blank or absence of the operator);

Postfix arithmetic operators

! — factorial;

$x \widehat{ } { exp }$ — exponentiation;

Comparisons

$\mathbf{\backslash le}$ — less than or equal to;

${\mathbf >}$ — greater than;

${\mathbf <}$ — less than;

$\mathbf{\backslash ge}$ — greater than or equal to;

== — it is equal;

$\mathbf{\backslash ne}$ — it is unequal;

Infix Boolean operators

$\mathbf{ \backslash lor}$ — disjunction (logic OR);

$\mathbf{ \backslash \&}$ — conjunction (logic AND);

$\mathbf{ \backslash neg}$ — negation.

Key prefix operators

d — the symbol of derivative, wich is usualy used in the differential equations,

D — the operator of differentiation: D(f) and D(f, x) are the first derivative by $x$; D(f, y{ \widehat{ } 3)} is the third derivative by $y$;

expand — opening all brackets;

fullExpand — to expand expression containing logarithmic, exponential and trigonometric functions;

extendedGCD — extended polynomial GCD, returns a vector containing GCD and additional multipliers of arguments;

GCD — GCD of polynomials;

factor — to factor expression;

fullFactor — to factor expression containing logarithmic and exponent functions;

initCond — boundary conditions for a system of linear differential equations;

LCM — polynomial LCM;

lim — the limit of an expression;

print — the print operator of the expressions, the names of which are listed in this operator (each expression printed in the new line);

printS — the print operator, which is similar to the Pascal print operator(for printing in several lines you can use the symbol $\backslash$n'';

plot — to plot explicit functions;

plot3D — to plot functions of two variables, which are given explicitly;

paramPlot — to plot parametric functions;

tablePlot — to plot of function, which are presented by the table of arguments and values;

prod — the symbol of product ($\prod$);

randomPolynom — to generate a random polynomial;

randomMatrix — to generate a random matrix;

randomNumber — to generate a random number;

sequence — the sequence;

showPlots — to display at one field of schedules of functions of different types;

solveLDE — to solve system of the linear differential equations;

systLAE — to set the system of the linear algebraic equations;

systLDE — to set the system of the linear differential equations;

sum — a summation symbol ($\sum$);

time — this operator returns the processor time in milliseconds;

value — to calculate value of expression by means of substitution of the expressions (or numbers) instead of ring variables;

Operators of the procedure, branching and loop

$if( ){ } else{ }$ — operator of the branch;

$while( ) { }$ — operator of the cycle with a precondition;

$for( ; ; ) { }$ — cycle operator with a counter.

Matrix, matrix elements and matrix operators

[ , ] — setting vector (row-vector);

[[ , ], [ , ]] — the matrix may be defined as vector of vectors;

A_{i,j} — (i,j)-element of the matrix A;

A_{i,?} — row i of the matrix A;

A_{?,j} — j column of the matrix A;

$\backslash$IO_{n,m} — zero matrix of size $n \times m$;

$\backslash$I_{n,m} — $n \times m$ matrix with ones on the diagonal;

+, -, * — addition, subtraction, multiplication;

charPolynom() — calculation of a characteristic polynomial;

kernel() — calculation of a kernel (zero-space of matrix);

transpose or $\mathbf{A}$^{T} — transposing;

conjugate() or $\mathbf{A}$^{$\backslash$ ast} — conjugate;

toEchelonForm() — calculation of the matrix echelon form;

det() — calculation the determinant;

rank() — calculation the rank;

inverse() or $\mathbf{A}$^{-1} — calculation of the inverse of a matrix;

adjoint() or $\mathbf{A}$^{$\backslash$ star} — calculation of the adjoint matrix;

genInverse() or $\mathbf{A}$^{+} — generalized inverse of a matrix Moore-Penrose;

closure() or $\mathbf{A}$^{$\backslash$ times} — closure, i.e. the amount of $I + A + A^2 + A^3 + …$. For the classical algebras is equivalent to $(I-A)^{-1}$.

LSU() — LSU decomposition of a matrix. The result is a vector of three matrices [L,S,U]. Where L is a lower triangular matrix, U — upper triangular matrix, S — permutation matrix, multiplied by the inverse of the diagonal matrix.

LSUWMdet() — Result is a vector of 6 matrices $[L, S, U, W, M, [[det]]]$. A = LSU, pseudoInverse(A) = $(1/det^2)$WSM, det is a nonzero maximum in size angular minor.

BruhatDecomposition() — Bruhat decomposition of a matrix. The result is a vector of three matrices [V,D,U]. Where V and U — upper triangular matrices, D — permutation matrix, multiplied by the inverse of the diagonal matrix.

pseudoInverse() — Pseudo inverse of a matrix. It, unlike the Moore-Penrose matrix, satisfies only two of the four identities. However, it is faster to compute;

SVD() — SVD decomposition of a matrix over real numbers. The result is a vector of three matrices $[U, D, V^{T}]$. Here $U, V^{T}$ — are orthogonal matrices, $D$ is a diagonal matrix.

QR() — QR decomposition of a matrix over real numbers. The result is a vector of two matrices $[Q, R]$. Here $Q$ — is an orthogonal matrix, $R$ — is an upper triangular matrix.

sylvester(p1, p2, kind=0 or 1) — the Sylvester matrix is constructed from the coefficients of the polynomials $p1, p2$. The ring Z [x, y, z, u] will be considered as a ring Z[u][x, y, z] (ring in one variable u with coefficients from Z[x, y, z].) If kind = 0, then the size of the matrix is (n1 + n2), if kind = 1, then the size of the matrix is 2*max(n1, n2).

cholesky(A) or cholesky(A, 0) — Cholesky Decomposition of a matrix. The matrix A must be symmetric and positive definite, only in this case the expansion will be correctly calculated. cholesky(A, 1) you can use in the case of large dense matrices, starting from a size of 100x100. Here we used block multiplication according to the Winograd — Strassen algorithm. חזרה לתוכן העניינים