#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 24 15:04:03 2024

@author: sam
"""

import numpy as np
from scipy import linalg as la

A = np.random.rand(4,4) # creates a 4x4 matrix A of random numbers

P,L,U = la.lu(A) # LU decomposition of A

print(L) # prints L matrix

print(U) # prints U matrix