TITLE: Projective but not free (exercise from Adkins - Weintraub)
QUESTION [7 upvotes]: This is exercise 38 from Chapter 3 (Modules and Vector Spaces) in Algebra by Adkins and Weintraub (GTM). How do you solve this problem? 
Let 
\begin{equation*}
R = \lbrace f : [0, 1] \to \Re : f \;\text{ is continuous and} \; f (0) = f (1) \rbrace  
\end{equation*}
and let
\begin{equation*}
M = \lbrace f : [0, 1]\to \Re : f \;\text{is continuous and} \; f (0) = - f (1) \rbrace.
\end{equation*}
Then $R$ is a ring under addition and multiplication of functions, and $M$ is an $R$-module. Show that $M$ is a projective $R$-module that is not free.

REPLY [6 votes]: I'll consider the interval $[0,2\pi]$ for notational simplicity. Consider the matrix 
$$
A = \left(
\begin{array}{cc}
 \sin ^2\tfrac{\theta }{2} & - \sin
   \tfrac{\theta }{2} \cos
   \tfrac{\theta }{2} \\
 -\sin \tfrac{\theta }{2}\cos
   \tfrac{\theta }{2} & \cos
   ^2\tfrac{\theta }{2}
\end{array}
\right),
$$ 
which defines an $R$-linear map $p:R^2\to R^2$. Computing $A^2$ we see that $p^2=p$, so $p$ is idempotent, and its kernel is a projective $R$-module $P$.
Now consider the map $$
\phi : f\in M \mapsto(f(\theta)\cos \tfrac{\theta }{2},f(\theta)\sin
   \tfrac{\theta }{2}) \in R^2.
$$
It is clearly an $R$-linear injective map, whose image is precisely the kernel $P$ of $p$. It follows that $M\cong P$, and this shows projectivity.
Non-freeness is more subtle...
There is a morphism of rings $\varepsilon:R\to\mathbb R$ given by evaluation at $0$. One can see that $P\otimes_R\mathbb R$ is of dimension $1$ over $\mathbb R$, so that if $P$ is free, then it is free of rank $1$. In that case, $M$ would be free of rank $1$: suppose so, and let $h\in M$ be a generator. It is immediate then that every element of $M$ has to vanish where $h$ vanishes. But one can easily find an element of $M$ whose only zero is not a zero of $h$.