function Feb4()

n = 4;
%(a)::::::::::::::::::::::::::::::::::
A = randn(n,n);
b = randn(n,1);
%Solve Cx = b given that C = A*A'.
% Plan: Solve Az = b and then A'x = z
[L,U,P] = lu(A);
% Cx = A(A'x) = b. 
% Solve Az = b...
y = L\(P*b); z = U\y;
% Solve A'x = (P'LU)'x = U'(L'(Px) = z for x...
r = U'\z; s = L'\r; x = P'*s;
PartaConfirm = [x (A*A')\b]

%(b) :::::::::::::::::::::::::::::::::::::
A = randn(n,n); F = randn(n,n); f = randn(n,1); g = randn(n,1);
% Solve Au + Fv = f and Av = g for u and v...
[L,U,P] = lu(A);
v = U\(L\(P*g));
u = U\(L\(P*(f - F*v)));
x = [A F ; zeros(n,n) A]\[f;g];
PartbConfirm = [x [u;v]]