%richardson iteration for approximating the solution to Ax = b

A = [1,1/2;1/3,1];
b = [4;3];
x_0 = [4;1];          %initial guess of solution
I = eye(2);           %identity matrix
N = 10;               %number of iterations

%first we do richardson iteration to solve Ax = b

x = x_0;
for i=1:N
    x = x+b-A*x;
end

disp('estimate of the solution is...')
x

disp('exact solution is')
x_exact = linsolve(A,b)





