Measurable projection on the null space of a random matrix Consider a random $n\times n$ real matrix $\Sigma$ on a measure space $(\Omega,\mathcal F)$. Let $\ker(\Sigma)$ denote its random null space. If $f:(\Omega,\mathcal F)\to\mathbb R^n$ is a Borel measurable map, can one show the existence of a Borel measurable map $\mathcal g:(\Omega,\mathcal F)\to\mathbb R^n$ such that, for all $\omega\in\Omega$,
$$g(\omega)=  P_{\ker(\Sigma(\omega))}\,f(\omega)$$
where $P_{U}\,v$ denotes the orthogonal projection of $v$ onto the subspace $U$ ?
Thanks for your help.

EDIT: I made an attempt below. Any feedback is very appreciated.
Let $M_n$ denote the space of $n\times n$ real matrices endowed with the Frobenius matrix norm. Let $\mathcal B(M_n)$ denote the Borel $\sigma$-algebra on $M_n$. Since $M_n$ is homeomorphic with $\mathbb R^{n^2}$ there is a bijection between $\mathcal B(M_n)$ and $\mathcal B(\mathbb R^{n^2})$.
I will try to show that the map $(\Sigma,v) \mapsto P_{\ker(\Sigma)}v$ from $(M_n\times \mathbb R^n,\mathcal B(M_n) \otimes \mathcal B(\mathbb R^{n^2}))$ to $(\mathbb R^n,\mathcal B(\mathbb R^n))$ is measurable. The result will then follow by composing with the measurable map $\omega\mapsto (\Sigma(\omega),f(\omega)$).
The idea is to apply a principle of measurable choice as stated here. To this end let $X=M_n\times \mathbb R^n $, $Y=(\mathbb R^n)^3$ and  define
$$E=\bigg\{\big(\Sigma,v,u,w,x\big)\in X\times Y: v=u+w,u=\Sigma^\top x, \Sigma w=0 \bigg \}$$
Since a finite product of separable spaces is separable, we have that $X,Y$ are separable metric spaces. Using the sequential characterization of a closed set in a metric space and continuity of matrix multiplication, we see that $E$ is a closed subset of $X\times Y$. Since $X\times Y$ is homeomorphic with $\mathbb R^{n^2+4n}$, it is $\sigma$-compact. Closed subsets of $\sigma$-compact spaces are also $\sigma$-compact, so $E$ is $\sigma$-compact.
The principle of measurable choice therefore provides us with a Borel function $\varphi :\pi_X(E)\to Y$ whose graph is contained in $E$, where $\pi_X$ denotes the projection on $X$.
Note that $\pi_X(E)=X$, because $\mathbb R^n = \ker(\Sigma) \oplus \text{range}(\Sigma^\top)$. Moreover we have
$$\varphi_1(\Sigma,v)=P_{\text{range}(\Sigma^\top)}v$$
$$\varphi_2(\Sigma,v)=P_{\ker(\Sigma)}v$$
where $\varphi_1,\varphi_2$ denote the first and second component functions of $\varphi$, which are Borel measurable since $\varphi$ is.
The final thing to check is that $\mathcal B(X)=\mathcal B(M_n) \otimes \mathcal B(\mathbb R^{n^2})$, but this follows from the fact that $M_n$ and $\mathbb R^{n^2}$ are separable.
 A: Let $(1)$ be the assertion :

For all $f : \Omega \longrightarrow \mathbb R^n$ measurable, there exists $g : \Omega \longrightarrow \mathbb R^n$ measurable such that
$$
\forall \omega \in \Omega,~~~P_{ker(\Sigma(\omega))}f(\omega) = g(\omega).
$$

and $(2)$

The application $\omega \longmapsto P_{ker(\Sigma(\omega))}$ is measurable.

Let me show $(1)$ and $(2)$ are equivalent.
$\Longrightarrow$ :  Assume $(1)$ is true, denote $(e_k)$ the canonical basis of $\mathbb R^n$, then for all $k = 1,...,n$, applying $(1)$ to $f(\omega) = e_k$ yields that $\omega \longmapsto P_{ker(\Sigma(\omega))}e_k$ is measurable. Then by definition of the product sigma algebra the application
$$
\omega \longmapsto (P_{ker(\Sigma(\omega))}e_k)_{1 \leq k \leq n}
$$
is measurable from $\Omega$ to $(\mathbb R^n)^n$. The application that to a family of vectors assigns the corresponding matrix is measurable (it is continuous) so we have $(2)$.
$\Longleftarrow$ : Assume $(2)$, then take $f$ measurable, the matrix-vector product being measurable (it is continuous) you get that
$$
\omega \longmapsto P_{ker(\Sigma(\omega))}f(\omega) = ((M,v) \longmapsto Mv) \circ (\omega \longmapsto (P_{ker(\Sigma(\omega))}, f(\omega)))
$$
is measurable.
Then re consider your question, you noticed that
$$
\omega \longmapsto P_{ker(\Sigma(\omega))}= (M \longmapsto P_{Ker(M)}) \circ \Sigma
$$
so I think the only reasonable way to solve your problem is either to show that $M \longmapsto P_{Ker(M)}$ is measurable or either to provide an example of $\Sigma$ which shows $\omega \longmapsto P_{ker(\Sigma(\omega))}$ is not measurable.
