Quantile regression necessarily has a solution with $r$ residuals equal to 0: why/how Given data $\{(Y_i,X_{1,i},X_{2,i}\dots X_{p,i}):1\le i\le n\}$. let $\theta\in(0,1)$ and $\beta=(\beta_1,\beta_2\dots\beta_p)^T$.
Then, the quantile regression problem
$$\underset{\alpha,\beta}{\min}\sum_{i=1}^n\{|Y_i-\alpha-\beta_1X_{1,i}-\dots-\beta_pX_{p,i}|+(2\theta-1)(Y_i-\alpha-\beta_1X_{1,i}-\dots-\beta_pX_{p,i})\}$$
has a solution such that at least $r$ of the residuals are $0$ if rank of the $n\times1$ matrix formed by rows of $\{(1,X_{1,i},X_{2,i}\dots X_{p,i}):1\le i\le n\}$ is $r$.

What is the logic behind this result? Why should a minimizer with $r$
residuals 0 exist? To understand this better I looked at one case
where rank of the matrix is $p+1$. Then, it says a minimizer should
exist such that all residuals are $0$. How does that make sense if
$(1,X_{1,i},X_{2,i}\dots X_{p,i})$ is a linearly independent set (for
rank to be $p+1$)?


I don't have time for a full answer now, but this is too much for a comment.
Quantile regression is solved via linear programming, so you will find some background at

*

*Formulating quantile regression as Linear Programming problem?

*How does quantile regression "work"?
and I believe the result about zero residuals is effectively proved in many linear programming texts.

The following post is close to a proof:   Residual using absolute loss linear regression
