Matrix operations

The matrix window contains three matrix containers (value arrays): A, B and X. Mathgrapher handles real matrices only. The results (eigenvalues, eigenvectors) may be complex. The screen view show the operations that can be performed on these matrices:

Matrix additionX = A + B
Matrix multiplicationX = A B
Matrix multiplicationX = Transp (A)
Matrix multiplicationFind solution for A X = B
Inverse of AEigenvalues/vectors
Determinant of AX = Inv (A) so that X A = 1
Determinant of ADet (A)

Matrices – Solve A.X=B

The solution is computed to the real linear least squares minimize ||AX-B|| where A is a m x n matrix which may be rank-deficient.


Suppose you have a number of measurements B(ti), where you expect that B is the result of a linear combination of functions (or data sets):

A and B are known and we want to find C (=X) for which ||AC-B|| is minimized. Let’s assume that c1=1, c2=2, c3=3, c4=4 and calculate B for t=0, 0.5, 1.0, 1.5, 2.0, 2.5, and 3.0.

When the Go button is pushed the following solution for C (or X) is found. The results are given in the matrix X. The results are also written in the Results.out file and shown in the results window.

Note that A may also contain columns that represent data sets instead of functions. The least squares algorithm used here is also used in the Curve fit module (linear least squares fit to a combination of functions and Data sets.