Case where an orthogonal projection matrix becomes a diagonal matrix?

Let $A$ be a tall $m \times n$ matrix with full column rank. Let $m \times m$ matrix

$$H=[h_{ij}] = A(A'A)^{-1}A'$$

denote the orthogonal projection onto the column space of $A$. I know that $0 \leq h_{ii} \leq 1$ for all $i = 1,2,\dots,m$, i.e., all the diagonal elements of projection matrix $H$ should be between $0$ and $1$.

I'm wondering in which case $H$ matrix is a given diagonal matrix $D$. In other words, what restriction on matrix $A$ will lead to a conclusion that $H=D$, where $D$ is given?

• What is the orthogonal projection of a matrix? – Arnaud Mortier Jun 26 '18 at 20:44
• Its defined as $A(A’A)^{-1}A’$. – user568810 Jun 26 '18 at 20:59
• Thanks. Can you give me any advice what the form of A should be? – user568810 Jun 26 '18 at 21:25
• If $A$ is truly arbitrary, then $A'A$ might not be invertible, in which case the expression $A(A'A)^{-1}A'$ is undefined. – amd Jun 26 '18 at 23:05
• If $H$ is diagonal, what does that say about its image? – amd Jun 26 '18 at 23:06

In order for your formula to make sense, $A$ must have linearly independent columns. We therefore assume that this is the case.

$H$ will be diagonal if and only if $A$ has an invertible $n \times n$ submatrix and $A$ has zeros in all entries outside this submatrix.

• Thank you for your help. If I want $H$ want to be a CERTAIN (or GIVEN) $m \times m$ diagonal matrix, what would be the restriction on $n\times n$ submatrix of $A$? – user568810 Jun 27 '18 at 13:09
• I thought I didn't specify what I wanted, so I wrote another post : math.stackexchange.com/questions/2833611/…. – user568810 Jun 27 '18 at 13:11

Where the columns of $X_{n \times p}$ are orthogonal. You have used $H$ to denote the projection matrix, so I guess the domain is regression analysis. So, when the columns of $X$ are orthogonal, that is algebraic implication of pairwise independent random variables, then $X'X = I_p$, thus $$X(X'X)^{-1}X'=XI_p^{-1}X'=XX'= I_n.$$

• Thanks for the answer. Yes, it's about regression analysis. Actually, the projection matrix $H$ needs to be a certain form, such that $I-D$, where $D$ is a given diagonal matrix. I guess I didn't specify what I want. So I wrote another post, please refer to this : math.stackexchange.com/questions/2833611/… – user568810 Jun 27 '18 at 13:00

Let $\mathrm A \in \mathbb R^{m \times n}$ be tall and have full column rank. Let $\rm A = U \Sigma V^\top$ be its singular value decomposition (SVD). Let

$$\rm A \,\big( A^\top A \big)^{-1} A^\top = \cdots = U \begin{bmatrix} \mathrm I_n & \mathrm O\\ \mathrm O & \mathrm O\end{bmatrix} U^\top$$

be the $m \times m$ projection matrix that projects onto the column space of $\rm A$. Therefore, if $\rm U$ is an $m \times m$ permutation matrix, i.e., if the $n$-dimensional column space of $\rm A$ is spanned by $n$ of the $m$ vectors in the standard basis of $\mathbb R^m$, then the projection matrix will be diagonal with diagonal entries $0$ and $1$.

• Thanks for your help. I think I didbn't specify what I needed in the post. Sorry for inconvenience. I want $H$ to be a specific given diagonal matrix $D$, where the elements of $D$ is bounded between zero and one. But this $D$ is given. Given $D$, I want to reconstruct the form of $A$. – user568810 Jun 27 '18 at 13:13