$P,Q\in \mathbb{R}^{m\times n}$ with image $(Q)\subseteq$ image(P). Then for allmost all $c\in \mathbb{R}$ we need to show
$(i)rank(P)=rank(P+cQ)$
$(ii)$ $im(P)=im(P+cQ)$
I understand that both are completely equivalent statement.
I thought about (i), since im(Q) is lying inside im(P) so clearly $\dim(im(Q))\le \dim(im(P))$ if the containmaint is strict then this dimension inequlaity also become strict, so then $rank(Q)<rank(P)$
Now for almost all real number $c$ , $P+cQ$ is is a linear map and image of $(P+cQ)\subseteq image (P)$ due to $im(Q)\subseteq im(P)$ so $rank(P+cQ)\le rank(P)$
I am not able to prove the other way inequality. thanks for helping.
Let $z=\text{rank}(P)$.
Our problem is clearly equivalent to proving that there is a finite number of values $c$ such that $\text{rank}(P+cQ)\neq z$. (clearly the rank of $P+cQ$ is at most $z$).
To do this we can select a $z\times z$ submatrix of $P$ that has rank $z$ (it is quite easy to show this is possible by first selecting a $z\times m$ submatrix and then a $z\times z$ submatrix of the previous submatrix).
Let $P'$ be the aforementioned submatrix. and let $Q'$ be the corresponding submatrix of $Q$. Clearly, it is sufficient for $P'+cQ'$ to have rank $z$ so that $P+cQ$ has rank $z$.
So it is sufficient to have $\det(P'+cQ')\neq 0$. And this can happen at most $z$ times because $\det(P'+cQ')$ is a non-zero polynomial in $c$ of degree $z$.( to see it is non-zero notice $\det(P'+0Q')\neq 0$.)