RosettaCodeData/Task/Cholesky-decomposition/Maxima/cholesky-decomposition.maxima
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

12 lines
422 B
Text

/* Cholesky decomposition is built-in */
a: hilbert_matrix(4)$
b: cholesky(a);
/* matrix([1, 0, 0, 0 ],
[1/2, 1/(2*sqrt(3)), 0, 0 ],
[1/3, 1/(2*sqrt(3)), 1/(6*sqrt(5)), 0 ],
[1/4, 3^(3/2)/20, 1/(4*sqrt(5)), 1/(20*sqrt(7))]) */
b . transpose(b) - a;
matrix([0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0])