**4. NIEDP for generalized doubly stochastic matrices**

In this section, we provide sufficient conditions for the existence of nonnegative generalized doubly stochastic matrices with prescribed elementary divisors. In particular, we show how to transform a generalized stochastic matrix, not necessarily nonnegative, with given elemen‐ tary divisors, into a nonnegative (positive) generalized doubly stochastic matrix, at the expense of increasing the Perron eigenvalue, but keeping other elementary divisors unchanged. This is what the following result does:

**Theorem 8** [11] *Let Λ* = {*λ*1, …, *λn*} *be a list of complex numbers, with <sup>Λ</sup>*¯ <sup>=</sup>*Λ*, <sup>∑</sup> *i*=1 *n λ<sup>i</sup>* >0, *λ*1 > |*λ<sup>i</sup>* |, *i* = 2, …, *n*. *where λ*1, …, *λ<sup>p</sup> are real and λp* + 1, …, *λ<sup>n</sup> are complex nonreal numbers. Let*

$$(\left(\mathcal{Y}-\mathcal{Y}\right), \left(\mathcal{Y}-\mathcal{Y}\_{\mathcal{Z}}\right)^{n\_1}, \dots, \left(\mathcal{A}-\mathcal{A}\_{k}\right)^{n\_k}, n\_2 + \dots + n\_k = n - 1, 0$$

*the prescribed elementary divisors (prescribed JCF). Let M be as defined in (4) and let mk* = − min{0, R*eλk*, I*mλk*}, *k* = 2, …, *n*. *If each of the following statements hold:*

$$(i) \; \mathcal{J}\_1 \ge M + \sum\_{k=2}^{s} m\_k, \; i$$

<sup>0</sup> { } { } {} 1 23 L= -+ -- L=- - L= L= 7, 1 3 , 1 3 ; 2, 2 ; 1 ; 0 *i i* 1 23 { } { } {} 4, 2, 2 ; 1,1 ; 0 .

G= - - G= G=

é ù ê ú = ê ú ê ú ê ú ë û

301000 100 0 00003 220000 100 <sup>34</sup> <sup>8</sup> <sup>=</sup> <sup>0000</sup> 000100 010 7 7 000010 010 0 00700

<sup>é</sup> ùé ù <sup>ê</sup> úê úé ù <sup>ê</sup> úê úê ú <sup>ê</sup> úê ú <sup>ê</sup> úê ú <sup>+</sup>

<sup>ê</sup> úê ú <sup>ê</sup> úê úë û <sup>ê</sup> úê ú êë úê ú ûë û

In this section, we provide sufficient conditions for the existence of nonnegative generalized doubly stochastic matrices with prescribed elementary divisors. In particular, we show how to transform a generalized stochastic matrix, not necessarily nonnegative, with given elemen‐ tary divisors, into a nonnegative (positive) generalized doubly stochastic matrix, at the expense

*B*

*has the spectrum Λ*0*with diagonal entries* 4, 1, 0. *Then, from Theorem 7, we have*

022000 100

000000 001

é ù ê ú

ë û

**4. NIEDP for generalized doubly stochastic matrices**

*with the prescribed spectrum and elementary divisors.*

*A*

*The matrix*

100 Applied Linear Algebra in Action

*and*

*ii*) *λ*1 > *Reλk* + *Imλk* + *n*(*mk*), *k* = 2, …, *n*,

$$\text{(iii) } Re\mathcal{A}\_k + Im\mathcal{A}\_k - \frac{t}{n}\varepsilon < \frac{1}{n}\sum\_{k=1}^n \mathcal{A}\_k \text{ , } k = 2, \dots, n.$$

*where ε* < 0, *with*

$$\mathbb{P}\left|\mathcal{E}\right| \le \min\left\{ \min\_{2 \le k \le p} \left| \mathcal{J}\_k \right|, \min\_{p+1 \le k \le n} \left| \operatorname{Im} \mathcal{J}\_k \right|, \frac{1}{t} \sum\_{i=1}^n \mathbb{X}\_i \right\},\tag{7}$$

*for real λk* ≠ 0, *k* = 2, …, *p*, *or*

$$\|x\| \le \min \left\{ \min\_{p+1 \le k \le n} \|Im \mathcal{A}\_k\|, \frac{1}{t} \sum\_{l=1}^n \mathcal{A}\_l \right\},\tag{8}$$

*if λk* = 0, *with λ<sup>k</sup> being the zero of an elementary divisor* (*λ* −*λ<sup>k</sup>* ) *nk* , *nk* ≥ 2, *and t being the total number of times that ε appears in the prescribed JCF*, *in certain positions* (*i*, *i* + 1), *i* = 2, …, *n* − 1, *then there exists a nonnegative generalized doubly stochastic matrix with the prescribed elementary divisors.*

**Proof**. Let *λ<sup>i</sup>* be real, *i* = 2, …, *p*, and let *xj* = *Reλ<sup>j</sup>* and *yj* = *Imλ<sup>j</sup>* , *j* = *p* + 1, …, *n* − 1. Consider the initial matrix *A*∈CS*λ*<sup>1</sup> ,

$$A = \begin{bmatrix} \lambda\_1 \\ \vdots \\ \lambda\_l - \lambda\_l - \varepsilon & \lambda\_l & \varepsilon \\ \lambda\_1 - \lambda\_l & \lambda\_l & \ddots \\ \vdots \\ \lambda\_1 - \lambda\_l - \chi\_h & & \lambda\_h & \chi\_h \\ \lambda\_1 - \lambda\_h + \chi\_h - \varepsilon & & -\chi\_h & \chi\_h \\ \lambda\_1 - \lambda\_h + \chi\_h - \varepsilon & & -\chi\_h & \chi\_h \\ \lambda\_1 - \lambda\_h - \chi\_h & & & \chi\_h & \chi\_h \\ \vdots \\ \lambda\_1 - \chi\_h + \chi\_h & & & -\chi\_h & \chi\_h \\ \vdots \\ \lambda\_1 - \chi\_{n-1} + \chi\_{n-1} & & & & -\chi\_{n-1} & \chi\_{n-1} \end{bmatrix},$$

which has the desired *JCF*. First, from Theorem 2, we can transform *A* into a nonnegative matrix *A*' ∈CS*λ*<sup>1</sup> . Let

$$r\_k = m\_k, \ k = 2, \dots, n \quad \text{and}$$

$$\mathbf{r}^r = \left( -\sum\_{k=2}^n r\_k, r\_2, r\_3, \dots, r\_n \right).$$

Then from condition *i*), the matrix *A*' = *A* + **er***<sup>T</sup>* is nonnegative, *A*' ∈CS*λ*<sup>1</sup> , and from Lemma 1, it has same elementary divisors as *A*. We now describe how to perturb *A*' to make it nonnegative generalized doubly stochastic. Define

$$\mathbf{q}^T = \left(-\sum\_{k=2}^n q\_k, q\_2, q\_3, \dots, q\_n\right),$$

with

$$q\_k = \frac{1}{n} \left( \vec{\lambda}\_1 - Re \vec{\lambda}\_k - Im \vec{\lambda}\_k - m r\_k - \varepsilon \right),$$

if the *kth* column of *A* has *ε* above *Imλk* or above a real *λk*, and

$$q\_k = \frac{1}{n} \left( \vec{\lambda}\_1 - Re \vec{\lambda}\_k - Im \vec{\lambda}\_k - nr\_k \right), k = 2, \dots, n, 1$$

otherwise. Let *B* = *A*' + **eq***<sup>T</sup>*. Again by Lemma 1, *B* has the same elementary divisors as *A*' (which are the same of *A*). From *ii*) it is clear that all entries of *B*, on columns 2 to *n*, are nonnegative. For the (1, 1) entry of *B*, we have, from (7) or (8), and assuming that *ε* appears a total of *t* times in positions (*i*, *i* + 1), that

$$
\lambda\_1 - \sum\_{k=2}^n r\_k - \sum\_{k=2}^n q\_k = \lambda\_1 - \sum\_{k=2}^n r\_k - \frac{1}{n} \sum\_{k=2}^n \left(\lambda\_1 - Re\lambda\_k - Im\lambda\_k - n r\_k\right) + \frac{1}{n} t\varepsilon \ge 0
$$

$$
= \frac{1}{n} \left(\sum\_{k=1}^n \lambda\_k + t\varepsilon\right) \ge 0.
$$

In position (*k*, 1), *k* = 2, …, *n*, we have from condition *iii*) that

1

l

lle




*l l l l*

M O

 e

*A xy x y*


11 1 1 1


which has the desired *JCF*. First, from Theorem 2, we can transform *A* into a nonnegative matrix

, 2, , and *k k r mk n* = =¼

2

=

2

=

*k*

*n*

*k*

**<sup>r</sup>** å

*n*

*T*

has same elementary divisors as *A*. We now describe how to perturb *A*'

*T*

if the *kth* column of *A* has *ε* above *Imλk* or above a real *λk*, and

2 3

æ ö =- ¼ ç ÷ è ø

*k n*

*rrr r*

= *A* + **er***<sup>T</sup>* is nonnegative, *A*'

2 3

æ ö =- ¼ ç ÷ è ø **<sup>q</sup>** <sup>å</sup>

( <sup>1</sup> ) <sup>1</sup> *<sup>k</sup> k kk q Re Im nr <sup>n</sup>* = - - - ll

( <sup>1</sup> ) <sup>1</sup> , 2, , , *<sup>k</sup> k kk q Re Im nr k n <sup>n</sup>* = - - - =¼

 l

ll

*qqq q*

*k n*

 l

 e

,,,, ,

,,, , .

M O

ë û - + -

*x y y x*

*n n n n*

e

∈CS*λ*<sup>1</sup>

, and from Lemma 1, it

to make it nonnegative

= ,

O

é ù ê ú

> *h h h h h h h h*

*x y x y x y y x*

*h h h h h h h h*


l

*x y y x*

 l e

M O O

1 1

l l

l

l

l

l

Then from condition *i*), the matrix *A*'

generalized doubly stochastic. Define

. Let

102 Applied Linear Algebra in Action

*A*' ∈CS*λ*<sup>1</sup>

with

l

$$\mathcal{A}\_1 - \operatorname{Re} \mathcal{A}\_k - \operatorname{Im} \mathcal{A}\_k - \sum\_{k=2}^n r\_k - \sum\_{k=2}^n q\_k = \frac{1}{n} \left( \sum\_{k=1}^n \mathcal{A}\_k + t\varepsilon \right) - \operatorname{Re} \mathcal{A}\_k - \operatorname{Im} \mathcal{A}\_k \ge 0.$$

Thus, all entries in *B* are nonnegative. Now we show that *B*, *<sup>B</sup> <sup>T</sup>* <sup>∈</sup>CS*λ*<sup>1</sup> : It is clear that *<sup>B</sup>* <sup>∈</sup>CS*λ*<sup>1</sup> : *<sup>B</sup>***e**=(*A*' <sup>+</sup> **eq***<sup>T</sup>* )**e**=*λ*1**e**. Then, since the row sums are each *λ*1, and from the way in which the *qk* were defined, each the columns 2, …, *n* have column sum *λ*1. The first column sum is also *λ*1.■

**Example 4***Let Λ* = {*λ*1, 2, 2, − 1 + *i*, − 1 − *i*, − 1 + *i*, − 1 − *i*}. *We want to construct a nonnegative generalized doubly stochastic matrix with elementary divisors* (*λ* − *λ*1), (*λ* + 2)2 , ((*λ* + 1)2 + 1)2 . *We start with the* 7 × 7 *initial matrix A*∈CS*λ*<sup>1</sup> , *and the desired JCF*:

$$A = \begin{bmatrix} \mathcal{A}\_1 & 0 & 0 & 0 & 0 & 0 & 0 \\ \mathcal{A}\_1 - 2 - \varepsilon & 2 & \varepsilon & 0 & 0 & 0 & 0 \\ \mathcal{A}\_1 - 2 & 0 & 2 & 0 & 0 & 0 & 0 \\ \mathcal{A}\_1 & 0 & 0 & -1 & 1 & 0 & 0 \\ \mathcal{A}\_1 + 2 - \varepsilon & 0 & 0 & -1 & -1 & \varepsilon & 0 \\ \mathcal{A}\_1 & 0 & 0 & 0 & 0 & -1 & 1 \\ \mathcal{A}\_1 + 2 & 0 & 0 & 0 & 0 & -1 & -1 \end{bmatrix}.$$

*We apply Theorem 2 to transform A into a nonnegative matrixA*' <sup>=</sup> *<sup>A</sup>* <sup>+</sup> **er***<sup>T</sup>* <sup>∈</sup>CS*λ*<sup>1</sup> ,*where for ε* = − 1,

$$\mathbf{r}^r = \left(-\sum\_{k=2}^r r\_k, r\_2, \dots, r\_\gamma\right) = \left(-\mathfrak{F}, 0, 1, 1, 1, 1, 1\right)$$

*Then we obtain*

$$A'=A+\mathbf{e}\mathbf{r}^T = \begin{bmatrix} \hat{\mathcal{A}}\_1 - \dots & 0 & 1 & 1 & 1 & 1 & 1\\ \hat{\mathcal{A}}\_1 - 6 & 2 & 0 & 1 & 1 & 1 & 1\\ \hat{\mathcal{A}}\_1 - 7 & 0 & 3 & 1 & 1 & 1 & 1\\ \hat{\mathcal{A}}\_1 - \dots & 0 & 1 & 0 & 2 & 1 & 1\\ \hat{\mathcal{A}}\_1 - \dots & 0 & 1 & 0 & 0 & 0 & 1\\ \hat{\mathcal{A}}\_1 - \dots & 0 & 1 & 1 & 1 & 0 & 2\\ \hat{\mathcal{A}}\_1 - \dots & 0 & 1 & 1 & 1 & 0 & 0 \end{bmatrix},$$

*which, by Lemma 1 is a nonnegative generalized stochastic matrix for all λ*<sup>1</sup> ≥ 7, *with the same elementary divisors as A*. *We now perturb A*' *to make it nonnegative generalized doubly stochastic. Define*

$$\begin{aligned} \mathbf{q}^T &= \left( -\sum\_{k=2}^7 q\_k, q\_2, \dots, q\_7 \right), \text{with} \ q\_1 = -\frac{1}{7} \left( 6\lambda\_1 - 33 \right) \\\\ q\_2 &= \frac{1}{7} \left( \lambda\_1 - 2 \right), q\_3 = \frac{1}{7} \left( \lambda\_1 - 8 \right), q\_4 = \frac{1}{7} \left( \lambda\_1 - 7 \right) \\\\ q\_5 &= \frac{1}{7} \left( \lambda\_1 - 5 \right), q\_6 = \frac{1}{7} \left( \lambda\_1 - 7 \right), q\_7 = \frac{1}{7} \left( \lambda\_1 - 4 \right) \end{aligned}$$

*Then B* = *A*' + **eq***<sup>T</sup> is nonnegative generalized doubly stochastic, with same elementary divisors as A*, *provided that*

$$\mathcal{A}\_1 - \mathcal{T} - \frac{1}{\mathcal{T}} (6\mathcal{A}\_1 - 3\mathcal{B}) \ge 0, \text{ that is } \mathcal{A}\_1 \ge 16.$$

The following result extends Theorem 8. A proof, which is built on the basis of Theorem 3, can be found in [11, Theorem 3.1]. The constructive nature of the proof allows us to compute a solution matrix.

**Theorem 9** [11] *Let Λ* = {*λ*1, *λ*2, …, *λn*} *be a list of complex numbers with <sup>Λ</sup>*¯ <sup>=</sup>*Λ*, <sup>∑</sup> *i*=1 *n λ<sup>i</sup>* >0, *λ*1 > |*λ<sup>i</sup>* |, *i* = 2, …, *n*. *Suppose there exists a partition <sup>Λ</sup>* <sup>=</sup>*Λ*<sup>0</sup> <sup>∪</sup>*Λ*<sup>1</sup> ∪⋯∪*Λp*<sup>0</sup> *with*

$$\Lambda\_{\mathbf{o}} = \left\{ \mathcal{A}\_{\mathbf{o}\_1}, \mathcal{A}\_{\mathbf{o}\_2}, \dots, \mathcal{A}\_{\mathbf{o}\_{\mathbf{o}\_0}} \right\}, \; \mathcal{A}\_{\mathbf{o}\_1} = \mathcal{A}\_{\mathbf{o}}$$

$$
\Lambda\_k = \left\{ \mathcal{A}\_{\mathbb{k}1}, \mathcal{A}\_{\mathbb{k}2}, \dots, \mathcal{A}\_{\mathbb{k}p\_k} \right\}, p\_k = p, k = 1, \dots, p\_o, p
$$

*where the lists Λk*, *k* = 1, …, *p*0, *have cardinality p*, *in such a way that:*

*i*) *For each k* = 1, …, *p*0, *there exists a list*

*Then we obtain*

104 Applied Linear Algebra in Action

*Then B* = *A*'

*provided that*

solution matrix.

l

l

l



*divisors as A*. *We now perturb A*' *to make it nonnegative generalized doubly stochastic. Define*

*q q q with q*

æ ö = - ¼ =- - ç ÷

21 3141 ( ) ( ) ( ) <sup>111</sup> 2, 8, 7 <sup>777</sup> *qqq* =- =- = lll

5161 71 ( ) ( ) ( ) <sup>111</sup> 5, 7, 4 <sup>777</sup> *qqq* =- =- = lll

1 1 ( ) <sup>1</sup> <sup>1</sup> 7 6 33 0, that is 16. <sup>7</sup>


The following result extends Theorem 8. A proof, which is built on the basis of Theorem 3, can be found in [11, Theorem 3.1]. The constructive nature of the proof allows us to compute a

L= ¼ = 0 01 02 0 01 1 {

 l

, ,, , *<sup>p</sup>*<sup>0</sup> }

 l l

*which, by Lemma 1 is a nonnegative generalized stochastic matrix for all λ*<sup>1</sup> ≥ 7, *with the same elementary*

l

l

l

l

*<sup>T</sup> A A*

¢

*T*

=+ = -

**er**

2

=

*k k*

è ø **<sup>q</sup>** <sup>å</sup>

ll

**Theorem 9** [11] *Let Λ* = {*λ*1, *λ*2, …, *λn*} *be a list of complex numbers with <sup>Λ</sup>*¯ <sup>=</sup>*Λ*, <sup>∑</sup>

ll

*i* = 2, …, *n*. *Suppose there exists a partition <sup>Λ</sup>* <sup>=</sup>*Λ*<sup>0</sup> <sup>∪</sup>*Λ*<sup>1</sup> ∪⋯∪*Λp*<sup>0</sup> *with*

é ù ê ú -

ë û -

( ) <sup>7</sup> 27 1 1

<sup>1</sup> ,,, , 6 33

+ **eq***<sup>T</sup> is nonnegative generalized doubly stochastic, with same elementary divisors as A*,

 l

> *i*=1 *n*

*λ<sup>i</sup>* >0, *λ*1 > |*λ<sup>i</sup>*


7

l

$$\Gamma\_k = \left\{ \alpha\_k, \mathcal{A}\_{k1}, \dots, \mathcal{A}\_{k\rho\_k} \right\}, 0 < \alpha\_k < \mathcal{A}\_1$$

*which is realizable by a nonnegative (positive) matrix Ak*, *withAk* , *Ak <sup>T</sup>* <sup>∈</sup>CS*ω<sup>k</sup>* ,*and with prescribed elementary divisors*

$$(\left(\mathcal{X} - \alpha \nu\_k\right), \left(\mathcal{X} - \mathcal{X}\_{k1}\right)^{n\_{k1}}, \dots, \left(\mathcal{X} - \mathcal{X}\_{kj}\right)^{n\_{kj}}, n\_{k1} + \dots + n\_{kj} = p\_k, p\_j$$

*ii*) *There exists a p*0 × *p*<sup>0</sup> *nonnegative (positive) matrix B* =(*bij*)*i*, *<sup>j</sup>*=1 *<sup>n</sup> such that <sup>B</sup>*, *<sup>B</sup> <sup>T</sup>* <sup>∈</sup>CS*λ*<sup>1</sup> , *with spectrum Λ*<sup>0</sup> *and diagonal entries <sup>ω</sup>*1, *<sup>ω</sup>*2, …, *<sup>ω</sup>p*<sup>0</sup> , *and with certain of the prescribed elementary divisors.*

*Then there exists a nonnegative (positive) matrix A*, *such thatA*, *<sup>A</sup><sup>T</sup>* <sup>∈</sup>CS*λ*<sup>1</sup> ,*with spectrum Λ and with the prescribed elementary divisors associated to the lists Λk*.

**Example 5***Let Λ* = {12, 5, 2, 2, 0, − 1, − 1, − 2 + *i*, − 2 − *i*}. *To construct a positive generalized doubly stochastic matrix A with elementary divisors*

$$(\mathcal{A}-12), (\mathcal{A}-5), (\mathcal{A}-2)^2, \mathcal{A}, (\mathcal{A}+1)^2, \mathcal{A}^2 + 4\mathcal{A} + 5$$

*we take the partition*

$$\Lambda\_0 = \{1\mathcal{Z}, \mathcal{S}, \mathbf{0}\}, \Gamma\_1 = \{\mathcal{T}, \mathcal{Z}, \mathcal{Z}\}, \Gamma\_2 = \{6, -2 + i, -2 - i\}, \Gamma\_3 = \{4, -1, -1\}$$

*and we compute the positive generalized doubly stochastic matrices*

$$\mathcal{A}\_1 = \frac{1}{3} \begin{bmatrix} 10 & 5 & 6 \\ 7 & 11 & 3 \\ 4 & 5 & 12 \end{bmatrix}, \mathcal{A}\_2 = \frac{1}{3} \begin{bmatrix} 2 & 9 & 7 \\ 5 & 3 & 10 \\ 11 & 6 & 1 \end{bmatrix}, \mathcal{A}\_3 = \frac{1}{3} \begin{bmatrix} 1 & 5 & 6 \\ 7 & 2 & 3 \\ 4 & 5 & 3 \end{bmatrix}.$$

*with spectra Γ*1, *Γ*2, *Γ*3, *and elementary divisors* (*λ* − 7), (*λ* − 2)2 ; (*λ* − 6), *λ*<sup>2</sup> + 4*λ* + 5; *and* (*λ* − 4), (*λ* + 1)2 , *respectively. Moreover, we compute*

$$B = \begin{bmatrix} 7 & 1 & 4 \\ 2 & 6 & 4 \\ 3 & 5 & 4 \end{bmatrix} \text{ with spectrum } \Lambda\_0, \text{ and } C = \begin{bmatrix} 0 & 1 & 4 \\ 2 & 0 & 4 \\ 3 & 5 & 0 \end{bmatrix}.$$

Finally

$$XCX^{\top} = \frac{1}{3} \begin{bmatrix} 0 & 0 & 0 & 1 & 1 & 1 & 4 & 4 & 4\\ 0 & 0 & 0 & 1 & 1 & 1 & 4 & 4 & 4\\ 0 & 0 & 0 & 1 & 1 & 1 & 4 & 4 & 4\\ 2 & 2 & 2 & 0 & 0 & 0 & 4 & 4 & 4\\ 2 & 2 & 2 & 0 & 0 & 0 & 4 & 4 & 4\\ 2 & 2 & 2 & 0 & 0 & 0 & 4 & 4 & 4\\ 3 & 3 & 3 & 5 & 5 & 5 & 0 & 0 & 0\\ 3 & 3 & 3 & 5 & 5 & 5 & 0 & 0 & 0\\ 3 & 3 & 3 & 5 & 5 & 5 & 0 & 0 & 0 \end{bmatrix},$$

$$A = \begin{bmatrix} A\_1 \\ A\_2 \\ A\_3 \end{bmatrix} + XCX^\top$$

is positive generalized doubly stochastic matrix with the prescribed elementary divisors.
