[Jprogramming] matrix inverse
Roger Hui
RHui000 at shaw.ca
Sat Dec 10 14:28:44 HKT 2005
No Householder, but the following are available:
Choleski http://www.jsoftware.com/jwiki/Essays/Choleski_Decomposition
LU http://www.jsoftware.com/jwiki/Essays/LU_Decomposition
QR http://www.jsoftware.com/jwiki/Essays/QR_Decomposition
Triangular http://www.jsoftware.com/jwiki/Essays/Triangular_Matrix_Inverse
These can be used to compute the matrix inverse (among other things).
----- Original Message -----
From: "Rob Hodgkinson" <rhodgkin at bigpond.net.au>
To: "'Programming forum'" <programming at jsoftware.com>
Sent: Friday, December 09, 2005 9:24 PM
Subject: RE: [Jprogramming] matrix inverse
Impressive Roger ! Very nice. Do you have something as succinct that
describes the method using Householder transforms as well ? .../Regards Rob
-----Original Message-----
From: programming-bounces at jsoftware.com
[mailto:programming-bounces at jsoftware.com] On Behalf Of Roger Hui
Sent: Saturday, 10 December 2005 12:53 PM
To: programming at jsoftware.com
Subject: [Jprogramming] matrix inverse
How compactly can you define matrix inverse?
minors =: 1&(|:\.)"2^:2
det =: -/ .*
adjoint=: [: |: */~@($&1 _1)@# * det at minors
inverse=: adjoint % det
"adjoint" is the classical adjoint.
"minors" appears on the \. page of the dictionary
and also on the green Jsoftware mug. It was first
defined by Ken Iverson.
x=: 5 5 ?.@$ 10x
y=: inverse x
x +/ .* y
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
x
6 5 9 2 4
9 0 7 0 4
6 8 3 8 1
2 8 0 0 2
1 6 0 4 4
y
_9r64 39r256 17r256 35r512 _1r16
31r768 _59r1024 41r3072 249r2048 _3r64
37r192 _25r256 _13r768 _29r512 _1r16
_7r1536 _61r2048 511r6144 _593r4096 11r128
_1r48 5r64 _23r192 _7r128 1r4
More information about the Programming
mailing list