Could anyone confirm me that rank of these two matrices are $3$ or not? Thanks!
$$M=\begin{pmatrix}3&0&1&0\\0&2&2&-1\\1&2&3&0\\0&-1&0&2\end{pmatrix}, \quad N=\begin{pmatrix}1&-1&-3&0\\0&2&0&-1\\-3&-1&1&2\\-2&-2&0&2\end{pmatrix}.$$
After doing several time elementary row operation I have got following matrices:
$$M=\begin{pmatrix}3&0&1&0\\0&2&2&-1\\0&0&2&3\\0&0&0&0\end{pmatrix}, \quad N=\begin{pmatrix}1&-1&0&0\\0&2&0&-1\\0&0&1&0\\0&0&0&0\end{pmatrix}.$$
It's already been noted in comments that Wolfram|Alpha can perform this check.
Alternatively, if you want to do it by hand, it's not too much effort to calculate the determinants of these matrices by row or column expansion, due to the many zeros. The determinants are both $0$, so the rank is less than $4$. It's easy to find three linearly independent rows or columns in either matrix, so the rank is at least $3$. Thus the rank is $3$.