Given a vector $\mathbf{x} \in \mathbb{R}^N$, let's define:
$$\text{diag}(\mathbf{x}) = \begin{pmatrix} x_1 & 0 & \ldots & 0 \\ 0 & x_2 & \ldots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \ldots & x_N \end{pmatrix}.$$
Moreover, let
$$\mathbf{1}= \begin{pmatrix} 1 & 1 & \ldots & 1 \\ 1 & 1 & \ldots & 1 \\ \vdots & \vdots & \ddots & \vdots \\ 1 & 1 & \ldots & 1 \end{pmatrix}.$$
Here is my question:
When is the matrix $\mathbf{M} = \text{diag}(\mathbf{x}) + \mathbf{1}$ invertible?
I was able to find some results when $x_1 = x_2 = \ldots = x_N = x$. Indeed, the matrix $M$ is singular when:
- $x=0$. This is trivial since $\mathbf{M} = \mathbf{1}$...
- $x=-N$. In this case, if you sum up all the rows (or columns) of the matrix $M$, you get the zero vector.
What can I say in the general case when $\text{diag}(\mathbf{x})$ is a generic vector?