Using the individual functions we can build a calculator that calculates the determinant of a matrix, the adjugate and the inverse of a matrix.

The calculator primitive contains the two scripts indexed below:

The calculator expects a notecard containing a square matrix of any dimension to be dropped into the main primitive. After that, you can touch the primitive and it will start computing the determinant, adjugate and inverse of the matrix.

The script below computes the inverse of a flattened matrix in a list. The list is a row-by-row flattening of a matrix $A$:

A = 
e_{0} & e_{1} & e_{2} & e_{...} & e_{j} \\
e_{j+1} & e_{j+2} & e_{j+3} & e_{...} & e_{j+k} \\ 
e_{...} & e_{...} & e_{...} & e_{...} & e_{...} \\

such that we obtain the list m:

list m = [ e₀, e₁, e₂, ... ];

The method executes three steps in succession based on the Laplace method of calculating matrices:

  1. Calculates $det(A)$.
  2. Calculates the adjugate of $A$ as $adj(A)$.
  3. Finally calculates $A^{-1}=\frac{adj(A)}{det(A)}$.

The final stage assumes that $det(A)\ne0$ since if $det(A)=0$, then the matrix does not have an inverse.


secondlife/inverse_matrix_calculator.txt · Last modified: 2017/02/22 18:20 (external edit)

Access website using Tor

For the copyright, license, warranty and privacy terms for the usage of this website please see the license and privacy pages.