# -*- coding: utf-8 -*-
"""
Created on Thu Sep 15 16:42:59 2022

@author: Chris
Lab 8 Q3
"""

import numpy as np
from scipy import linalg as la

A = np.random.rand(20,20)
b = np.random.rand(20,1)

AI = la.inv(A)

x = AI @ b

print('Solution: x=')
print(x)

print('L2norm difference from b:')
print(la.norm(A @ x - b,2))
