Program to print Lower triangular and Upper triangular matrix of an array | GeeksforGeeks

preview_player
Показать описание


This video is contributed by

Please Like, Comment and Share the Video among your friends.

Install our Android App:

If you wish, translate into local language and help us reach millions of other geeks:

Follow us on Facebook:

And Twitter:

Also, Subscribe if you haven't already! :)
Рекомендации по теме
Комментарии
Автор

Incorrect order for upper and lower. For lower (i>j), for upper (j>i), not vice vera as he specified.

Marcusdel-opsb
Автор

I believe the code is inaccurate for the lower and upper matrices. All the program did was cancel out any terms above and below the main diagonal respectively. There is no elimination in either of the matrices and we can see that by multiplying L and U together where we do NOT return to the original matrix. The correct lower matrix should be [[1, 0, 0], [4, 1, 0], [7, 2, 1]] while the upper matrix should be [[1, 2, 3], [0, -3, -6], [0, 0, 0]].

robertmcnamee
Автор

Incorrect method. The input are output matrix are not equivalent. They're two different matrices. 00:57

arijitdas
Автор

The lower and upper matrices are not equivalent to the input matrix this is just wiping out the lower or upper tingle with zeros

orange.grapes