The algebraic theory of quadratic forms