I apologize if my question is stupid but I'm not very familiar with matrices over a principal ideal domain $R$ (For example, $R=\mathbb{Z}$ or $R=\mathbb{R}[X]$). I was wondering how to define the rank of a matrix $M \in \mathcal{M}_{n}(R)$.
If $R$ is a field, then the rank of $M$ is not a problem for me. It is defined as the dimension (over $R$) of the linear space spanned by the columns of $M$. So, the rank of $M$ is the maximum number of linearly independent columns of $M$.
Now, if $R$ is a principal ideal domain, I have found a similar definition on Internet. But what is, in that case, the meaning of $\left\langle C_{1},\ldots,C_{n} \right\rangle$ (the linear space spanned by the columns $C_{1},\ldots,C_{n}$ of $C$) ? Of which vector space is it a subspace ? I feel more comfortable by defining the rank of the matrix $M \in \mathcal{M}_{n}(R)$ as the smallest nonnegative integer $s$ such that there exist a $n \times s$ matrix $P$ (with coefficients in $R$) and a $s \times n$ matrix $Q$ (with coefficients in $R$) such that $M=PQ$.
What would be a good definition? Can you please enlighten me about the definition with the dimension?
$⟨C_1,…,C_n⟩$ is the submodule of $R^{(n)}$ generated by $C_1,...,C_n$. It's a free module if R is a p.i.d., and it's dimension (cardinality of its basis) is the rank of the matrix. This definition coincides with the rank defined by the smallest size of non-zero minor, and also coincides with your $M=PQ$ difinition. For more information see section 3.7 of Basic Algebra I by Jacobson.