Suppose I have an $n\times n$ real (or complex) matrix of rank $k$, and I want to pick $k$ linearly independent rows from it. I want to do this in a continuous fashion as the matrix varies continuously. I'm being a bit vague here, but I think it doesn't matter, because a colleague tells me that it's a standard fact that no matter how one tries to make this precise, the task is impossible (at least if $2\le k\le n-1$). Unfortunately he can't remember where he read this or how to prove it. Can someone confirm this and supply the missing details?


**EDIT:** As pointed out by several people, I shouldn't have said "rows" but rather a basis for the row space. Sorry for the confusion.



Impossibility of continuously picking k independent rows from a rank k matrix
Picking $k$ linearly independent rows is harder than picking a basis for the row space. The row space forms a vector bundle on the manifold of rank $k$ matrices. Picking a basis continuously would be equivalent to picking a trivialization of the vector bundle. 


So your colleague's claim is weaker than the fact that the row space vector bundle on that manifold is nontrivial, for $1 \leq k \leq n-1$.


In the real case: Its first Stiefel-Whitney class is nontrivial, because the manifold of rank $k$ matrices is a fiber bundle on the Grassmanian $G\_k^n$, and we are just pulling back the tautological bundle. The tautological bundle has all Stiefel-Whitney classes nontrivial, and the fibers of the map are connected, so the pullback of that class is similarly nontrivial


In the complex case: We can make a similar argument with the first Chern class, using the fact that the fibers are simply connected.


