Consider the space $M(m, n)$ of matrices of size $m \times n$ over field $K$.
Let $X \subset M(m, n)$ be the subset of matrices of rank $3$.
Show that $X$ is an algebraic subvariety of $M(m, n)$.
Compute the dimension of the variety $X$.
Consider the space $M(m, n)$ of matrices of size $m \times n$ over field $K$.
Let $X \subset M(m, n)$ be the subset of matrices of rank $3$.
Show that $X$ is an algebraic subvariety of $M(m, n)$.
Compute the dimension of the variety $X$.
One way to compute the dimension is to recognize that $n \times n$ matrix of rank at most $k$ can be written as a product $AB$, for $A \in M_{n \times k}$ and $B \in M_{k \times n}$. (This is the factorization of any map $T: V \to V$ as $V \to V / ker T \to V$.) This gives a map $\phi: M_{n \times k} \times M_{k \times n} \to Y$, where $Y$ is the variety of rank at most $k$ matrices, and this map is matrix multiplication. (The open variety $X$ of rank exactly $k$ matrices is an open subvariety of this, and will have the same dimension.)
From this one can compute the dimension of $Y$. You can do this by computing the dimension of a fiber over a point of $X$. Note that there is a transitive action by $GLn \times GL_n$ (conjugation) on both the domain and the target, and the multiplication is equivariant: $\rho(A,B) * (M,N) = (AM,NB^{-1})$ goes to $A(MN)B^{-1} = \rho'(A,B) (MN)$. So we only need to compute the dimension of the fiber over a single point in $X$. The simplest matrix to try is the one that has a kxk identity matrix in the upper left hand corner, and zeros everywhere else. Just now I got $k^2$ dimensional fiber (in order to get that identity block, you need invertibel matrices in the right spots, and this forces lots of zeros), so the dimension of $X$ is $2kn - k^2$. This seems to agree with the wikipedia page linked by Martin-Blas's answer, though the technique for computation there is different.
Pick all the $k\times k$ submatrices with $k\ge3$. The condition ${\rm rank}(M)=3$ is equivalent to det(some $3\times 3$ submatrix of $M$)$\ne 0$ and all the det(greater submatrices=0). And the determinant is a polynomial.