Editing
Matrix Inverse/Divide
From NARS2000
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
'''Caution:''' Be careful not to confuse this symbol, which is <apll>⌹</apll>, with <apll>⍠</apll> which is [[Variant]]. <hr /><table border="1" cellpadding="5" cellspacing="0" rules="none" summary=""> <tr> <td> <table border="0" cellpadding="5" cellspacing="0" summary=""> <tr> <td valign="top"><apll>Z←⌹R</apll></td> <td></td> <td></td> <td>returns the inverse of the right argument.</td> </tr> </table> </td> </tr> <tr> <td><apll>R</apll> is a numeric scalar, vector or matrix; otherwise signal a <apll>RANK ERROR</apll>.</td> </tr> <tr> <td><apll>Z</apll> is a numeric array of rank <apll>⍴⍴R</apll>, and shape <apll>⌽⍴R</apll>.</td> </tr> </table> <br /> <p>This feature implements matrix inversion on '''Boolean''', '''integer''', or '''floating point''' arguments using [http://www.gnu.org/software/gsl/manual/html_node/Singular-Value-Decomposition.html Singular Value Decomposition]. In particular, this means that any numeric array meeting the rank and shape requirements above is invertible.</p> <p>Matrix inverse (<apll>⌹R</apll>) and matrix division (<apll>L⌹R</apll>) on '''Rational''', '''VFP''', or '''Ball''' arguments each have two limitations above and beyond that of normal conformability:</p> <ul> <li><p>for a '''square''' (<apll>=/⍴R</apll>) right argument that it be non-singular, and</p></li> <li><p>for an '''overdetermined''' (<apll>>/⍴R</apll>) or '''underdetermined''' (<apll></⍴R</apll>) right argument that the symmetric matrix <apll>(⍉R)+.×R</apll> be non-singular.</p></li> </ul> <p>These limitations are due to the algorithm ([http://en.wikipedia.org/wiki/Gauss%E2%80%93Jordan_elimination Gauss-Jordan Elimination]) used to implement Matrix Inverse/Divide on Rational and VFP numbers.</p> <p>Overdetermined matrices are evaluated equivalently to the expression <apll>(⌹(⍉R)+.×R)+.×⍉R</apll>.</p> <p>Underdetermined matrices are evaluated equivalently to the expression <apll>(⍉R)+.×⌹R+.×⍉R</apll>.</p> <p>For example,</p> <apll><pre> ⌹3 3{rho}0 0 0 0 0 0 0 0 0 0 ⌹3 3⍴1 2 3 4 ¯0.1944444444 0.2777777778 0.02777777778 0.05555555556 ¯0.2222222222 0.2777777778 0.3611111111 0.05555555556 ¯0.1944444444 ⌹3 3⍴1 2 3 4<pn>x</pn> ¯7<pn>r</pn>36 5<pn>r</pn>18 1<pn>r</pn>36 1<pn>r</pn>18 ¯2<pn>r</pn>9 5<pn>r</pn>18 13<pn>r</pn>36 1<pn>r</pn>18 ¯7<pn>r</pn>36 </pre></apll> <h2>Variations On Matrix Divide</h2> <p>For variations on this function, see the [[Variant#Eigenvalues_and_Eigenvectors|Variant Operator]].</p> <table border="1" cellpadding="5" cellspacing="0" rules="none" summary=""> <tr> <td> <table border="0" cellpadding="5" cellspacing="0" summary=""> <tr> <td valign="top"><apll>Z←L⌹R</apll></td> <td></td> <td></td> <td>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.</td> </tr> </table> </td> </tr> <tr> <td><apll>L</apll> is a numeric scalar, vector or matrix; otherwise signal a <apll>RANK ERROR</apll>.</td> </tr> <tr> <td><apll>R</apll> is a numeric scalar, vector or matrix; otherwise signal a <apll>RANK ERROR</apll>.</td> </tr> <tr> <td>If either <apll>L</apll> or <apll>R</apll> is a scalar or vector, it is coerced to a matrix by <apll>(L R)←⍪{each}L R</apll>. After this coercion, if the two matrices have a different number of rows, signal a <apll>LENGTH ERROR</apll>.</td> </tr> <tr> <td><apll>Z</apll> is a numeric array. Before the above coercion of <apll>L</apll> and <apll>R</apll>, the rank of <apll>Z</apll> is <apll>¯2+2⌈(⍴⍴L)+⍴⍴R</apll>, and the shape is <apll>(1↓⍴R),1↓⍴L</apll>.</td> </tr> </table> <br /> <p>This feature implements matrix division on '''Boolean''', '''integer''' and '''floating point''' arguments using [http://www.gnu.org/software/gsl/manual/html_node/Singular-Value-Decomposition.html Singular Value Decomposition]. In particular, this means that any two numeric arrays meeting the rank and shape requirements above are divisible.</p> <p>As noted above, Matrix Division on '''Rational''', '''VFP''', or '''Ball''' arguments uses a different algorithm and has slightly more restrictive conformability requirements.</p> <ul> <li><p>for a '''square''' (<apll>=/⍴R</apll>) right argument that it be non-singular, and</p></li> <li><p>for an '''overdetermined''' (<apll>>/⍴R</apll>) or '''underdetermined''' (<apll></⍴R</apll>) right argument that the symmetric matrix <apll>(⍉R)+.×R</apll> be non-singular.</p></li> </ul> <p>Overdetermined matrices are evaluated equivalently to the expression <apll>(⌹(⍉R)+.×R)+.×(⍉R)+.×L</apll>.</p> <p>Underdetermined matrices are evaluated equivalently to the expression <apll>(⍉R)+.×⌹R+.×(⍉R)+.×L</apll>.</p> <p>For example,</p> <apll><pre> a←3 3⍴0 a⌹a 0 0 0 0 0 0 0 0 0 1 2 3⌹3 3⍴1 2 3 4 0.4444444444 0.4444444444 ¯0.1111111111 1 2 3⌹3 3⍴1 2 3 4<pn>x</pn> 4<pn>r</pn>9 4<pn>r</pn>9 ¯1<pn>r</pn>9</pre></apll> <hr width=35%><br> <big>For several more everyday problem-solving examples using Matrix Inverse see also '''[[Symbol_Domino|Domino Symbol ⌹]]'''.</big> <br><hr width=35%> {{Article footer|2|Matrix}}
Summary:
Please note that all contributions to NARS2000 may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
NARS2000:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Article footer
(
edit
)
Template:Keyboard
(
edit
)
Template:Language Toolbar
(
edit
)
Template:Language Toolbar Group 1
(
edit
)
Template:Language Toolbar Group 10
(
edit
)
Template:Language Toolbar Group 11
(
edit
)
Template:Language Toolbar Group 12
(
edit
)
Template:Language Toolbar Group 2 EN
(
edit
)
Template:Language Toolbar Group 3
(
edit
)
Template:Language Toolbar Group 4
(
edit
)
Template:Language Toolbar Group 5
(
edit
)
Template:Language Toolbar Group 6
(
edit
)
Template:Language Toolbar Group 7
(
edit
)
Template:Language Toolbar Group 8
(
edit
)
Template:Language Toolbar Group 9
(
edit
)
Template:Language Toolbar Notation
(
edit
)
Template:Symbol footer
(
edit
)
Navigation menu
Page actions
Page
Discussion
Read
Edit
Edit source
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Tools
What links here
Related changes
Special pages
Page information