a matrix decomposition story

11 views
Skip to first unread message

Michal Wallace

unread,
Apr 27, 2026, 10:54:37 PM (10 days ago) Apr 27
to fo...@jsoftware.com
I had this matrix:

  ] y =. > 1 2 1; 2 3 4; 3 5 2

1 2 1

2 3 4

3 5 2


I used 128!:10 to get the LU decomposition...

But the decomposition was not what I expected:

128!:10 y

┌─────┬───────┐

│0 1 2│1 2 1│

│ │2 _1 2│

│ │3 1 _3│

└─────┴───────┘


So I did this:

   [ 'LU L I U' =. ((1 { 128!:10) , [: (>/~ ; =/~ ; <:/~) i.@#) y

┌───────┬─────┬─────┬─────┐

│1 2 1│0 0 0│1 0 0│1 1 1│

│2 _1 2│1 0 0│0 1 0│0 1 1│

│3 1 _3│1 1 0│0 0 1│0 0 1│

└───────┴─────┴─────┴─────┘

So I could do this:

(I + LU * L) ; (LU * U)

┌─────┬───────┐

│1 0 0│1 2 1│

│2 1 0│0 _1 2│

│3 1 1│0 0 _3│

└─────┴───────┘


But I was sure I could do that tacitly with gerunds.


I couldn't figure it out, so I started writing this email.


But then I learned about m"n and realized I could combine it with m/ !

([: (;`+)/&.|. (1 {:: 128!:10) (*`]`*)"2 (>/~ , =/~ ,: <:/~)@i.@#) y

┌─────┬───────┐

│1 0 0│1 2 1│

│2 1 0│0 _1 2│

│3 1 1│0 0 _3│

└─────┴───────┘


(the end)

bill lam

unread,
Apr 27, 2026, 11:11:58 PM (10 days ago) Apr 27
to fo...@jsoftware.com
Isn't 128!:10 LUP?
The permutation 0&{ should be significant.

To unsubscribe from this group and stop receiving emails from it, send an email to forum+un...@jsoftware.com.

Michal Wallace

unread,
Apr 27, 2026, 11:32:51 PM (10 days ago) Apr 27
to fo...@jsoftware.com
Yes. It wasn't actually the decomposition I thought it was. I just got sidetracked trying to do that thing. :D
Reply all
Reply to author
Forward
0 new messages