function p4
  A = [0.25,0.35,0.15;0.2,0.2,0.25;0.15,0.2,0.25]
  b = [0.6;0.9;0.7]

  fprintf('Part a)\n\n')

  cond_inf_A = cond_inf(A)

  fprintf('\nPart b)\n\n')

  x = A \ b

  fprintf('\nPart c)\n\n')

  deltaA = [0.01,0,0;0,0,-.01;0,-0.01,0]
  deltab = [0.01;0.02;-0.03]

  xtilde = (A+deltaA) \ (b+deltab)
  relative_change_in_A = norm(deltaA, Inf)/norm(A, Inf)
  relative_change_in_b = norm(deltab, Inf)/norm(b, Inf)
  relative_change_in_x = norm(x-xtilde, Inf)/norm(x, Inf)
  bound_on_change_in_x = ...
    cond_inf_A/(1-cond_inf_A*relative_change_in_A)...
    *(relative_change_in_b + relative_change_in_A)

  fprintf('\nPart d)\n\n')

  deltaA = [0,-0.01,0.01;-0.01,0.01,0;0.01,0,0.01]
  deltab = [0.02;0.01;-0.01]

  xtilde = (A+deltaA) \ (b+deltab)
  relative_change_in_A = norm(deltaA, Inf)/norm(A, Inf)
  relative_change_in_b = norm(deltab, Inf)/norm(b, Inf)
  relative_change_in_x = norm(x-xtilde, Inf)/norm(x, Inf)
  bound_on_change_in_x = ...
    cond_inf_A/(1-cond_inf_A*relative_change_in_A)...
    *(relative_change_in_b + relative_change_in_A)
end
function result = cond_inf(A)
  result = norm(A, Inf) * norm(inv(A), Inf);
end
function assert(v)
  if (v == 0)
    error('Assertion failed.')
  end
end
