function [v,alfa] = House(x)
% x is a column n-vector
% v is a unit 2-norm vector with the property that (I-2vv')x = alfa*e1  
% where e1 is the first column of eye(n,n)

s = norm(x);
if s==0
    v = [1;zeros(n-1,1)];
    alfa = 0;
elseif x(1)>=0
    v = x; 
    v(1) = x(1) + s;
    v = v/norm(v);
    alfa = -s;
else
    v = x;
    v(1) = x(1) - s;
    v = v/norm(v);
    alfa = s;
end