Matrix Inverse/Divide

From NARS2000
Revision as of 14:38, 24 November 2014 by Paul Robinson (talk | contribs) (add toolbar footer)
Jump to navigationJump to search
Z←⌹R returns the inverse of the right argument.
R is a numeric scalar, vector or matrix; otherwise signal a RANK ERROR. If R is a matrix, ≥/⍴R must be true; otherwise signal a LENGTH ERROR.
Z is a numeric array of rank ⍴⍴R, and shape ⌽⍴R.


This feature implements matrix inversion using Singular Value Decomposition. In particular, this means that any numeric array meeting the rank and shape requirements above is invertible.

For example,

      ⌹3 3⍴0
 0 0 0
 0 0 0
 0 0 0



Z←L⌹R returns the quotient of the left and right arguments. This quotient can be interpreted in various ways, such as the least squares solution of the system of linear equations determined by arguments.
L is a numeric scalar, vector or matrix; otherwise signal a RANK ERROR.
R is a numeric scalar, vector or matrix; otherwise signal a RANK ERROR.
If either L or R is a scalar or vector, it is coerced to a matrix by (L R)←⍪¨L R. After this coercion, if the two matrices have a different number of rows, signal a LENGTH ERROR.
Z is a numeric array. Before the above coercion of L and R, the rank of Z is ¯2+2⌈(⍴⍴L)+⍴⍴R, and the shape is (1↓⍴R),1↓⍴L.


This feature implements matrix division using Singular Value Decomposition. In particular, this means that any two numeric arrays meeting the rank and shape requirements above are divisible.

For example,

      a←3 3⍴0
      a⌹a
 0 0 0
 0 0 0
 0 0 0


NARS 2000 Lang
Tool
Bar
+ - × ÷ * ! ? |
< = >
~ § π .. ,
/ \ ¨ .
_ ¯
Second Row i j k i j k l g p r v x