LU Decomposition of a Square Matrix

Decomposition & Spectral Methods DS practice problem on Onlearn.

Difficulty: medium.

Topics: Understanding LU Decomposition for Square Matrices, Doolittle's Method, Forward Substitution, Back Substitution, Row Operations, In-place Computation, Linear Algebra, Matrix Calculus, Numerical Analysis, Computational Mathematics, Algorithmic Complexity, Matrix Factorization, Triangular Systems, Gaussian Elimination, Direct Methods, Numerical Stability.

Implement a function that performs LU Decomposition on a given square matrix A such that A = LU, where L is a lower triangular matrix with 1s on the diagonal and U is an upper triangular matrix. Assume the matrix is non singular and does not require partial pivoting.