  function Feb15()
% Suppose A = [A1 v ; v' alfa] is sym pos def with A1 = A(1:n-1,1:n-1)
% If G = [G1 0; g' beta] is its Cholesky factor and G1 = G(1:n-1,1:n-1)
% then by comparing the (1,1) block in A = G*G' we see that A1 = G1*G1'.

clc
n = 10;
A = randn(n,n); A = A*A';
G = chol(A,'lower');
b = randn(n,1);
x = G'\(G\b);
y = G(1:n-1,1:n-1)'\(G(1:n-1,1:n-1)\b(1:n-1));
errx = norm(A*x-b)
erry = norm(A(1:n-1,1:n-1)*y - b(1:n-1))