Would appreciate any help on this problem
Let $R$ be a commutative ring with 1, let $r_1,...,r_n\in R$ satisfy $R = Rr_1+\ldots+Rr_n$. If $M = \{(a_1,\ldots,a_n)\in R^n|a_1r_1+\ldots a_nr_n = 0\}$, show that $M$ is a projective $R$ module.
My ideas for this is to use the fact that the set $\{r_i-r_{i+1}\}$ generates $M$ and to somehow use the fact that a projective module is projective if it is the direct summand of a free module. That seems to be the simplest way to go about it. I'm not sure how to incorporate the fact that $R = Rr_1+\ldots+Rr_n$
HINT:
Take $b=(b_1, \ldots, b_n)$ such that $\sum b_i r_i=1$ and show that $M\oplus R\cdot b = R^n$