A = [3 6 6; 4 8 8];
a = A(:,1);
b = A(1,:)';
Pc = a*a'/(a'*a);
Pr = b*b'/(b'*b);
Pc*A*Pr