Ask Your Question
0

PLU factorisation in Sage

asked 2024-12-28 10:50:49 +0100

sagequstions gravatar image

updated 2024-12-28 10:52:13 +0100

One can obtain the PLU factorisation of a matrix in sage as in the following example:

M=matrix([[1,1],[1,2]])
display(M.LU())

Is there a way to see which exact algortihm is used (and what the exact code is) for Sage to calculate the PLU factorisation of a given matrix? I tried LU??, but it does not work for this command. I also searched for LU in https://doc.sagemath.org/ but was not able to find anything.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2024-12-28 11:24:55 +0100

tmonteil gravatar image

Sage relies on Python, hich is object oriented. This means that there is no global LU function, but possibly several LU methods that can only be applied to some particular objects. So, to get the source code of the LU method that will be applied to your matrix, you need to specify the matrix:

sage: M.LU??
edit flag offensive delete link more

Comments

Thank you! I find the reference "[TB1997]" but where can I look it up what exact book or article this is? And it seems for integer matrices always the same algorithm is used.

sagequstions gravatar imagesagequstions ( 2024-12-28 17:14:23 +0100 )edit

Ah, I think I found it here: http://sporadic.stanford.edu/referenc... : "Lloyd N. Trefethen and David Bau III, Numerical Linear Algebra, SIAM, Philadelphia, 1997." Thanks again!

sagequstions gravatar imagesagequstions ( 2024-12-28 17:16:05 +0100 )edit

SageMath documentation references.

slelievre gravatar imageslelievre ( 2024-12-29 00:29:14 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2024-12-28 10:50:49 +0100

Seen: 24 times

Last updated: Dec 28 '24