Contextuality and the fundamental theorem of noncommutative algebra