function out=pivot(A,i,j)
B=A;
S=size(A);
rows=S(1);
columns=S(2);
for k=1:rows
   if k~=i
      B(k,1:columns)=B(k,1:columns)-(B(k,j)/A(i,j))*A(i,1:columns);
   end
end
B(i,1:columns)=B(i,1:columns)/B(i,j);
out=B;
   
   