Let $M$ be an affine algebraic variety and consider the ring of polynomial functions on $M$, $\mathcal{O}(M):=\{f: M\to k : f\text{ a polynomial}\}$. If $k$ is algebraically closed we can recover our manifold by mapping maximal ideals in $\mathcal{O}(M)$ back to points on $M$, since maximal ideals will be of the form $(x-a)$.
This seems to me analogous to the notion of a dual space (the set of functionals on some vector space), where under good conditions (reflexivity) we can recover $M$ by considering the dual of the dual. Is anything like that going on here? Is the analogy superficial or is something deeper going on?
EDITED: I had originally revealed a deep confusion by calling the affine algebraic variety a manifold. I misunderstood my professor's comments at the end of class.