Matrix Inverse/Divide
From NARS2000
Revision as of 21:01, 7 May 2008 by Sudleyplace (talk  contribs)


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


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