An algebraic introduction to k-theory