Here is a simple question which I can't figure out.
I know that a projection is a linear mapping, so it has a matrix representation. What I am interested is finding the matrix which represents:
$$\pi_d : \mathbb{R}^{d+1} \rightarrow \mathbb{R}^d$$
which maps $\mathbb{R}^{d+1}$ onto the hyperplane $H=\{x \in \mathbb{R}^d : \langle x, \mathbf{1} \rangle = 1\}$, where $\mathbf{1}$ is the all-ones vector.
I can easily compute the position of a given vector projection; for example, considering $\pi_1$:
$$\begin{bmatrix} 1 \\ 0 \end{bmatrix} \mapsto \begin{bmatrix} 1/2 \\ -1/2 \end{bmatrix}$$
but I am unsure on how to get this explicitly as a $1$-dimensional vector.
If you could provide a hint rather than a full answer, I would be appreciative!
An orthogonal projection in $R^d$ is a type of linear transformation from $R^d$ into $R^d$. So its image is a subspace of $R^d$. Your $H$ is not a subspace of $R^d$, so there is no such thing as an orthogonal projection onto $H$.
You can fix that by moving $H$ to the origin; take $H$ to be the set of vectors orthogonal to ${\bf 1}$.
Now the hint. You can find the projection ${\bf p}$ of any vector ${\bf x}$ onto the span of ${\bf 1}$ by using the dot product as described in calculus books; it is the component of ${\bf x}$ in that direction. Once you have that, the difference ${\bf x-p}$ is what you are looking for. The matrix that you work out will be square of course, not $d$ by $d+1$.