Let $U, A \in M_{n,p}(\mathbb{R})$ such that : $^t U U = I_p$. Prove that the function : $t \mapsto \operatorname{rank}(U + tA)$ is constant on a neighborhood of $0$.
I have solution when $n = p$ and $U$ is invertible. To prove it we can do the following : the function $\det$ is continuous hence if there is a sequence $(t_n) \to 0$ such that $U + t_nA$ is not invertible it would mean that $\det(U+t_nA)$ but since $\det$ is continuous this is absurde since by taking the limit as $n \to \infty$ we get $\det(U) = 0$ which is false.
Somehow I think I need to use the same argument but in more clever way to extend the result to non-invertible and non-square matrix. Yet I don't know how to do so. One idea would be to say that a non-square matrix can be thought as a square matrix in which there are a lot of $0$, but the problem is that in this case the matrix is not invertible...
Thank you !
Note that by rank-nullity theorem, it suffices to show that $$ f(t)= \dim \ker(U+tA) $$ is constant on a neighborhood of $0$. We find that $U^TU=I_p$ implies $\ker U =(0)$, hence $f(0)=0$. Assume to the contrary that there exists a sequence $t_n\ne 0$ converging to $0$ such that $$ f(t_n)\ge 1,\quad n\ge 1. $$ Then there exists a sequence $(x_n)\subset \Bbb S^{p-1}$ of unit vectors such that $$ Ux_n+t_n Ax_n =0. $$ Since $\Bbb S^{p-1}=\{x \in\Bbb R^p: \|x\|=1\}$ is compact, by passing to a subsequence, we may assume that $x_n \xrightarrow{n\to\infty} x$ for some $x\in \Bbb S^{p-1}$. This implies $$ Ux = \lim_{n\to\infty}\left(Ux_n +t_nAx_n\right)=0, $$ which leads to the contradiction to that $\ker U =(0)$. Thus $f(t) = 0$ on a neighborhood of $0$ as wanted.