Let $M$ be a finite module over a local integral domain $(A,m)$. Let $k$ be its residue field and $Q$ its fraction field. Consider the $k$-vector space $M \otimes_A k$ and the $Q$-vector space $M \otimes_A Q$.
Show that $\dim_Q (M \otimes_A Q) \leq \dim_k(M \otimes_A k)$ and the equality holds if and only if $M$ is free.
My old and wrong idea (1):
We have two natural maps $\pi : (A,m) \to k$ and $\eta : (A,m) \to Q$, so using the universal property of the localization ($\eta$ satisfies all the required conditions) we obtain a module morphism $\phi : Q \to k$. Notice that because the diagram commutes, i.e. $\phi \circ \eta = \pi$ and $\pi$ is surjective, the same must be for $\phi$. We have the the short exact sequence: $ 0 \to \ker{\phi} \to Q \to k \to 0$ (surjectivity of $\phi$). Using now the fact that the tensor functor is rigth-exact, we should obtain the exact sequence $ M \otimes_A \ker{\phi} \to M \otimes_A Q \to M \otimes_A k \to 0$ and in particular the last nontrivial map must be surjective. It leads to $\dim(M \otimes_a Q) \geq \dim(M \otimes_a k)$ (notice that the sign of the inequality is wrong). Please, could help me in finding the mistake? (done, thanks!)
My old and incomplete idea (2):
I am trying to solve completely the exercise. Here is my new point. Observe that since $(A,m)$ is locally $m$ is the only principal idea and so it coincides with the Jacobson radical (and, in particular, it is contained in it). Let's now recall that $M \otimes_A k \simeq M/mM$, and focus the attention on the second member. Since $M$ is finitely generated, the same will be for its quotient, so choose here a family of generators ($\bar{m_1}$,...,$\bar{m_t}$). Does it suffice to claim that $\dim_k(M \otimes_A k)$ is less (or equal) than $t$? I think not, but I am a bit confused because we are working with generators in an $A$-module sense, while now I am looking for a basis for a vector space (but the set is the same).Then, I continue:using Nakayama's lemma on the previous generators, we obtain that $m_1$,..,$m_t$ is a set of generator for $M$. Let's now analyze the vector space $(M \otimes_A Q)$. Is order to obtain a set of generator for it, I should take all possible combinations of generators for both the modules...but being a field, $Q$ has just one generator. So I should obtain something like "$\dim_K(M \otimes_A Q)$ less or equal than $t+1$...
Edit: if you are interested, you can find here a related post (An exercise on tensor product over an integral domain.).
Thank you in advance. Cheers