TITLE: Invertible modules are locally free of rank 1
QUESTION [8 upvotes]: The original context of the following question is something about coherent sheaves over noetherian schemes, but the question itself is purely (commutatively-)algebraic. 
The definition of an invertible module is usually taken to be "locally free of rank one", namely if $M$ is an $A$-module for some ring $A$, then $M$ is invertible if $M_\mathfrak{p}\cong A_\mathfrak{p}$  for every $\mathfrak{p}\in \operatorname{Spec}(A)$. This definition is also equivalent to another one (that justifies the name), that there is an $A$-module $N$, such that $M\otimes N\cong A$ (and thus, $M$ represents an invertible element in the monoid of isomorphism classes of $A$-modules with tensor product). 
I was able to give a prove for this (I think), yet it is a bit long and technical so I was wondering if there is a good reference for a straightforward and elementary as possible proof of this equivalence somewhere in the literature (I couldn't find something that was focused enough), or if anyone is willing to sketch an outline of such proof for me.

REPLY [11 votes]: Part of the difficulty  comes from the fact that there are two notions of invertible modules over a ring $A$, to which I'll give provisional names and then quote a theorem showing  that they are the same .

Abstractly invertible modules
A finitely generated  $A$-module  $M$ is abstractly invertible if equivalently:
a)  $M$ is finitely generated projective of rank one.
b) There exists some $A$-module $N$ such that $M\otimes_A N \simeq A$ as $A$-modules.
If these conditions hold, then $N$ is necessarily isomorphic to the dual $A$-module  $M^*=\operatorname{Hom}_A(M,A)$ and the canonical $A$-linear map $M^*\otimes_A M \to A:\phi \otimes m\mapsto \phi(m)$ is an isomorphism.
The isomorphism classes of these  abstractly invertible modules form a group,  the Picard group $\operatorname{Pic}(A)$, in which multiplication is given by tensor product: $[M]\cdot[N]=[M\otimes_A N]$, the neutral element is $1=[A]$ and the inverse is determined by  $[M]^{-1}=[M^*]$, which explains the terminology invertible module.
Concretely invertible modules
Suppose now that $A$ is a domain with field of fractions $\operatorname{Frac}(A)=K$.
A sub-$A$-module $I\subset K$ is  concretely invertible if there exists  another sub-$A$-module $J\subset K$ such that $I\cdot J=A$ (here $I\cdot J$ is the $A$-submodule generated by the $i\cdot j$'s with $i\in I$, $j\in J$).
Theorem The module $I$ is concretely invertible if and only if it is abstractly invertible.
If this is the case the submodule $J= A:I=\left\{j\in K\middle|Aj\subset A\right\}$ is the only submodule of $K$ such that $I\cdot J=A$.
Moreover the canonical $A$-linear map $I\otimes J\to A:i\otimes j \mapsto i.j$ is an isomorphism, so that $J$ is a concrete incarnation of the inverse of $I$, namely $[I]^{-1}=[J]$
Bibliography An excellent reference is Chapter 2 of Bourbaki's Commutative Algebra.
Edit: generalization
The most general point of view is that of a locally free sheaf $\mathcal L$ of rank one on a ringed space $X$. This means that $X$ can be covered by open subsets $U_i$ such that   $\mathcal L|U_i \simeq\mathcal O_{U_i}$.
Isomorphism classes of such sheaves  constitute the Picard group $\operatorname{Pic}(X)$ of the ringed space $X$.
This applies to algebraic varieties, schemes, complex spaces,  differential manifolds, ...
If $X=\operatorname{Spec}(A)$ is the affine scheme corresponding to a ring $A$, this group $\operatorname{Pic}(X)$ is isomorphic to the group $\operatorname{Pic}(A)$ defined above under the correspondence associating to the sheaf $\mathcal L$ the $A$-module $M=\Gamma (X, \mathcal L)$.