Question: Given the discrete-time Lyapunov equation (1):

$$
A^T P A - P = bb^T 
$$

such that $P$ shall be diagonal and positive definite and $b$ is a column vector. How to characterize $A$ and $b$, where there are diagonal solutions $P \succ 0$? More precisely,

$$
S = \{A \in \mathbb{R}^{n\times n}, b \in \mathbb{R}^{n} \mid \exists \textrm{ diagonal } P \succ 0 \textrm{ for } (1) \}
$$

How to characterize $S$?

Answer: 
It seems hopeless to me. The considered equation 

$A^TPA-P=bb^T$ can be rewritten $\phi(P)=bb^T$, where $\phi=(A^T\otimes A^T-I\_{n^2})$ -if we stack the matrices row by row into vectors-. 

If $spectrum(A)=(\lambda\_i)\_i$, then $spectrum(\phi)=(\lambda\_i\lambda\_j-1)\_{i,j}$. Thus, in general , there is a unique solution 

$P=(\phi)^{-1}(bb^T)$. On the other hand, since if $P$ is a solution, then $P^T$ too, $\phi^{-1}$ is an automorphism of the symmetric matrices. 

Condition 1. The obtained symmetric $P$ is diagonal; there are $n(n-1)/2$ equations (dependent or not) linking the entries of $A=[a\_{i,j}],b$.
For example, when $n=2$ and $b=[88,-72]^T$, the condition is

[![enter image description here](https://i.stack.imgur.com/89deW.png)](https://i.stack.imgur.com/89deW.png)

When $n=3$, writing conditions takes up a lot of space!

Condition 2. $P>0$. That certainly works if the $(|\lambda\_i|)\_i$ are $>1$.
I make a different attempt to answer the question. $A,b \in S$ if there exists $c$ and $d$ such that 

$$
\begin{bmatrix}
A & b \\ c & d
\end{bmatrix}
\begin{bmatrix}
P & 0 \\ 0 & 1
\end{bmatrix}
\begin{bmatrix}
A^T & c^T \\ b^T & d
\end{bmatrix}
= 
\begin{bmatrix}
P & 0 \\ 0 & 1
\end{bmatrix}
$$

This is equivalent to 
$$
\begin{bmatrix}
P^{-1/2} & 0 \\ 0 & 1
\end{bmatrix}
\begin{bmatrix}
A & b \\ c & d
\end{bmatrix}
\begin{bmatrix}
P^{1/2} & 0 \\ 0 & 1
\end{bmatrix}
$$
being orthonormal. Thus $A$ is a submatrix of an (diagonally conjugated) orthonormal matrix. By Theorem 2.1 in [Fiedler,1996](https://www.sciencedirect.com/science/article/pii/S0024379508003595) $A$ has at least $n-1$ singular values equal to 1 and the remaining one is less than 1. Diagonal conjugation may change this of course.