# Drawing random subspaces from Grassmannian with uniform probability

Consider the Grassmannian manifold $$G(M, N)$$ of $$M$$-dimensional subspaces in $$R^N$$. I want to approximate (stochastically) an integral of the form $$\int_{G(M, N)} f(v) \, dv,$$ where $$f : G(M, N) \to R$$ is some function and $$dv$$ is the Haar measure on the Grassmannian. I want to approximate the integral with sampling, and therefore I need a method to uniformly draw samples with respect to the measure dv.

I'm happy about hints / references on how to do that.

• What do you mean by Haar measure here? Nov 26, 2018 at 16:09
• It's the pushforward measure of the Haar measure on the orthogonal group $O(N)$ under the map $f_H(g) = g H, g \in O(N)$, $f_H : O(N) \to G(N, M)$. I found this paper, arxiv.org/abs/math-ph/0609050 which provides a method to uniformly sample from $O(N)$ which by the above solves my question I think.
– yon
Nov 26, 2018 at 16:16
• Fill an $M\times N$ matrix with independent standard Gaussian random variables. The row space will have the desired Haar distribution. Nov 26, 2018 at 16:18
• @kimchilover Do you have a reference for that? Oct 7, 2019 at 16:20
• @Călin A standard reference is A. T. James, "Normal multivariate analysis and the orthogonal group". Ann. Math. Statistics 25 (1954), 40–75. But there might be newer & more accessible explanations. If I find a good one I'll post it here. Oct 7, 2019 at 17:23

To expand on one of the comments to your question. Indeed, sampling each component of an $$M \times N$$ matrix independently from the standard normal distribution yields a random $$M$$-dimensional subspace of $$\mathbb{R}^N$$.
Using the same reference as in this (related) question, i.e., Chikuse, Y. (2003). Statistics on Special Manifolds, we have from Theorem 2.2.2. that if the elements of $$Z \in \mathbb{R}^{M \times N}$$ are i.i.d. from $$\mathcal{N}(0, 1)$$, then $$P = Z (Z^\top Z)^{-1} Z^\top$$ is uniformly distributed on the subset of $$\mathbb{R}^{N \times N}$$ containing rank-$$M$$ projection matrices $$P = X X^\top$$, which is just another representation of the Grassmann manifold.
Thus, if you instead represent points via the column space of rank-$$M$$ matrices from $$\mathbb{R}^{N \times M}$$, you can use the matrix $$Z$$ directly. Note that $$Z^\top Z$$ has almost surely full rank, so its inverse above only amounts to a change of basis which should keep you in the same equivalence class (i.e., same Grassmann point).
Similarly, if you use orthonormal $$M$$-frames, then Gram-Schmidt should give you yet another representation of the same subspace.