Re: LUDecomposition
- To: mathgroup at smc.vnet.net
- Subject: [mg117733] Re: LUDecomposition
- From: Daniel Lichtblau <danl at wolfram.com>
- Date: Wed, 30 Mar 2011 04:15:57 -0500 (EST)
Kevin wrote:
> LUDecomposition[{{1, 2}, {3, 4}}]
> and
> LUDecomposition[{{3, 4}, {1, 2}}]
> both give the same output:
> {{{1, 2}, {3, -2}}, {1, 2}, 1}
>
> Only the output for the first matrix is correct.
>
> Alpha gives the same incorrect results for the 2nd matrix
> correct 1st matrix: http://www.wolframalpha.com/input/?i=LUDecomposition+{{1%2C2}%2C{3%2C4}}
> incorrect 2nd matrix: http://www.wolframalpha.com/input/?i=LUDecomposition+{{3%2C4}%2C{1%2C2}}
>
In versions I tried, I get for the second case
LUDecomposition[{{3, 4}, {1, 2}}]
Out[1]= {{{1, 2}, {3, -2}}, {2, 1}, 1}
This is correct.
I am not sure if Wolfram|Alpha is correct. Possibly it is failing to
account for the permutation vector.
Daniel Lichtblau
Wolfram Research