// extract the submatrix of A which is being operated on
SimpleMatrix A_small = QR.extractMatrix(i,END,i,END);
// A = (I - γ*u*u<sup>T</sup>)A
A_small = A_small.plus(-gamma,v.mult(v.transpose()).mult(A_small));
// save the results
QR.insertIntoThis(i,i,A_small);
QR.insertIntoThis(i+1,i,v.extractMatrix(1,END,0,1));