Algebra and Geometry in the Theory of Mixed States