**3. General sufficient conditions**

0 12 { } ,,, L= ¼ ll

L= L *<sup>r</sup>* {*s*1 1 ( ) *r pr pr pr pr* - ++ ++ , , , , , , 1, , ll

with *Λr* having *nr* + 1 elements, where *nr* is the number of elements of *Λr* − {*s*1(*Λ<sup>r</sup>* − 1)}, in such a

Moreover, since 0<Im *λp*+*<sup>r</sup>* ≤ − 3Re *λp*+*r*, *r* = 1, …, *m*, there exists, from Corollary 3, a nonneg‐

) of size *nr* + 1, with spectrum *Λr*, entry *anr*+1,*nr*+1

associated with *Λr*. Finally, by employing the Lemma 2 (Šmigoc Lemma) *m* times, we construct a nonnegative matrix *A* with spectrum *Λ* and with arbitrarily prescribed elementary divisors.

L= - - - - ± - ± - ± - ± {23, 1, 1, 1, 2 3 , 2 3 , 3 5 , 3 5 *iiii*}

( )( ) ( ) ( ) <sup>2</sup> <sup>2</sup> <sup>2</sup>

( )( )( )( ) llll

L= --- <sup>0</sup> { } 23, 1, 1, 1

L= - ± - ± <sup>1</sup> {20, 2 3 , 2 3 *i i*}

L= -± -± <sup>2</sup> {12, 3 5 , 3 5 . *i i*}

=20. *Λ*<sup>1</sup> *and Λ*<sup>2</sup> *are also realizable by nonnegative matrices A*1, *with elementary divisors*

*Clearly Λ*0*is realizable by a nonnegative matrix A*0, *with elementary divisors* (*λ* − 23), (*λ* + 1)2

+- +- ++ ++ 3 5, 3 5, 3 5, 3 5. *iiii*


 ll

 l

*be given. We want to construct a* 12 × 12 *nonnegative matrix with elementary divisors*

 l

l

way that ∑

■

*r*=1 *m*

94 Applied Linear Algebra in Action

ative matrix *Ar* =(*aij*

**Example 1***Let*

*Consider the lists*

*and entry a*<sup>44</sup>

(0)

with spectrum *Λ*0, the entry *app*

(*r*)

(0)

 l*p*

¼ =¼ } *r m*

=*s*1(*Λ*0) and with arbitrarily prescribed elementary divisors.

(0) )

, (*λ* + 1),

(*r*) <sup>=</sup>*s*1(*Λr*), for each *JCF*

 ll

*nr* =*n* − *p*. The list *Λ*0 satisfies Corollary 2, and then, we can compute a matrix *A*<sup>0</sup> =(*aij*

In this section, we start with a general result, which gives a simple sufficient condition for the existence and construction of a nonnegative matrix with prescribed spectrum and elementary divisors. In particular, the result stated that if the Perron eigenvalue *λ*<sup>1</sup> is large enough, then the list *Λ* = {*λ*1, …, *λn*} is the spectrum of a nonnegative matrix with prescribed elementary divisors. Since the result and its proof are somewhat involved, we start with the following example in order to illustrate the ideas and the constructive procedure followed in the proof:

**Example 2***Let Λ* = {*λ*1, 3, 3, − 1, − 1, − 1 ± 3*i*, − 1 ± 3*i*}.

*Case i*): *We want to construct a nonnegative matrix A with elementary divisors*

$$J\_1(\mathcal{A}\_1), J\_1(\mathfrak{Z}), J\_1(\mathfrak{Z}), J\_2(-1), J\_2(-1 + 3i), J\_2(-1 - 3i).$$

*We consider the initial matrix*

$$D = \begin{bmatrix} \lambda\_1 \\ & 3 \\ & & 3 \\ & & -1 \\ & & & -1 \\ & & & -1 \\ & & & & -3 & -1 \\ & & & & & -1 & 3 \\ & & & & & & & -1 & 3 \\ & & & & & & & & -3 & -1 \\ \end{bmatrix}$$

*Let S* = [**e**|**e**2| ⋯ |**e**9] *and E* = *E*4,5 + *E*7,8. *Then*

$$B = S\left(D + \varepsilon E\right)S^{-1}$$

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

*It is clear thatB* ∈CS*λ*<sup>1</sup> *has the desired JCF*. *Now, in order that B becomes nonnegative, we take*

$$\mathbf{q}^{\mathcal{T}} = (-10, 0, 0, 1, 1, 3, 1, 3, 1), |\mathcal{E}| \le 1, \mathcal{E}$$

*and apply Theorem 2 (Brauer result) to obtain the nonnegative matrix A* = *B* + **eq***<sup>T</sup>*, *where λ*<sup>1</sup> ≥ 10 + 3 = 13. *Moreover, from Lemma 1, A has the prescribed elementary divisors. Observe that the values* 3 *and* 10 *represent the cost we must pay to obtain A*. *These values are defined as*

$$M = \max\_{2 \le k \le n} \left\{ 0, \operatorname{Re} \mathcal{A}\_k + \operatorname{Im} \mathcal{A}\_k \right\} \text{ and }$$

$$m = -\sum\_{k=2}^{n} \min\left\{0, Re\mathcal{A}\_{\chi}, Im\mathcal{A}\_{\chi}\right\}.$$

*In this case, M* = 3 *and m* = 10.

1 3 3

l

l

le


l

l

l

l

l

l

l

*It is clear thatB* ∈CS*λ*<sup>1</sup>

3 3 3 3 1 1

+- - = + -

> e

*represent the cost we must pay to obtain A*. *These values are defined as*

*D*

*Let S* = [**e**|**e**2| ⋯ |**e**9] *and E* = *E*4,5 + *E*7,8. *Then*

96 Applied Linear Algebra in Action

1


= -

é ù

ê ú

1 .

e



ë û - -

( ) <sup>1</sup> *B SD ES* e- = +

é ù ê ú -

1 1 .

 e

2 1 3 4 3 1

*has the desired JCF*. *Now, in order that B becomes nonnegative, we take*

 l

{ }

l l

*k k*

min 0, , .

e

2 1 3 4 3 1

( 10,0,0,1,1,3,1,3,1 , 1, ) *<sup>T</sup>* **q** = - £

*and apply Theorem 2 (Brauer result) to obtain the nonnegative matrix A* = *B* + **eq***<sup>T</sup>*, *where λ*<sup>1</sup> ≥ 10 + 3 = 13. *Moreover, from Lemma 1, A has the prescribed elementary divisors. Observe that the values* 3 *and* 10

> { } <sup>2</sup> max 0, *k k k n M Re Im and* l

*m Re Im*

£ £ = +

2

= = -å

*k*

*n*


$$J\_1(\mathcal{A}\_1), J\_2(\mathfrak{F}), J\_2(-1), J\_2(-1+\mathfrak{H}), J\_2(-1-\mathfrak{H}).$$

*In this case, we take E* = *E*2,3 + *E*4,5 + *E*7,8, *and*

$$B = S\left(D + \varepsilon E\right)S^{-1}$$


*By choosing*

$$\mathbf{q}^r = (-10, 0, 0, 1, 1, 3, 1, 3, 1), \boldsymbol{\varepsilon} > 0,$$

*we obtain A* = *B* + **eq***<sup>T</sup>*, *which for λ*1 > *M* + *N* = 13, *is nonnegative with spectrum Λ*, *and with the prescribed elementary divisors.*

Now we state the mentioned result. A proof of it can be found in [9, Theorem 2.1].

**Theorem 6** [9] *Let Λ* = {*λ*1, *λ*2, …, *λn*} *be a list of complex numbers with <sup>Λ</sup>*¯ <sup>=</sup>*Λ*, <sup>∑</sup> *i*=1 *n λ<sup>i</sup>* ≥0, *and λ*1 ≥ |*λ<sup>i</sup>* |, *i* = 2, …, *n*. *Let*

$$M = \max\_{2 \le i \le n} \{ \mathbf{0}, \text{Re } \mathcal{A}\_{\mathbf{i}} + \text{Im } \mathcal{A}\_{\mathbf{i}} \}; \quad m = -\sum\_{i=2}^{n} \min \left\{ \mathbf{0}, \text{Re } \mathcal{A}\_{\mathbf{i}}, \text{Im } \mathcal{A}\_{\mathbf{i}} \right\}, \tag{4}$$

*if*

$$\begin{array}{ccc} \text{(i)} & \lambda\_1 \ge M + m, \\ \end{array} \tag{5}$$

*when all possible Jordan blocksJni* (*λi* )*, of size ni* ≥ 2, *are associated to a real eigenvalue λ<sup>i</sup>* < 0; *or when there is at least one Jordan block Jni* (*λi* ) *, of size ni* ≥ 2, *associated to a real eigenvalue λ<sup>i</sup>* ≥ 0 *with M* =Re *λ<sup>i</sup>* 0 + Im *λ<sup>i</sup>* 0 , *for some i*0 ≤ *n* − 1.

*or if*

$$\begin{array}{ll}\text{(i)} & \mathcal{J}\_{1} > M + m, \\ \end{array} \tag{6}$$

*when at least one Jordan blockJni* (*λi* )*, of size ni* ≥ 2, *is associated to a real eigenvalue λ<sup>i</sup>* ≥ 0 *with M* = *λ<sup>k</sup>* ≥ 0,

*then there exists an n* × *n nonnegative matrix A*∈CS*λ*<sup>1</sup> *with spectrum Λ and with prescribed elementary divisors*

$$(\left(\mathcal{X}-\mathcal{Y}\_{1}\right), \left(\mathcal{X}-\mathcal{X}\_{2}\right)^{n\_{1}}, \dots, \left(\mathcal{X}-\mathcal{X}\_{k}\right)^{n\_{k}}, \ n\_{2} + \dots + n\_{k} = n - 1 \dots$$

Let *A*, *X*, *C*, and *Ω* be as in Theorem 3, with

$$S^{-1} \left( A + XC \right) S = \begin{bmatrix} \Omega + CX & UAY + CY \\ 0 & VAY \end{bmatrix},$$

where *B* = *Ω* + *CX* is an *r* × *r* matrix with eigenvalues *μ*1, …, *μr* (the new eigenvalues) and diagonal entries *λ*1, …, *λr* (the former eigenvalues). Then from a result in [2, Chapter *VI*, Lemma 1.2], if *B* = *Ω* + *CX* and *VAY* have no common eigenvalues, *A* + *XC* is similar to *B* ⊕ *VAY*. Then we have:

**Lemma 4***Let A*, *X*, *Y*, *V*, *C*, *and Ω be as above. If the matrices B* = *Ω* + *CX and VAY have no common eigenvalues, then*

$$J\left(A + XC\right) = J\left(B\right) \oplus J\left(VAY\right).$$

*In particular, if CX* = 0, *A and A* + *XC are similar.*

The following result extends Theorem 6:

**Theorem 7** [9] *Let Λ* = {*λ*1, *λ*2, …, *λn*} *be a list of complex numbers with <sup>Λ</sup>* <sup>=</sup>*<sup>Λ</sup>*¯, *<sup>λ</sup>*<sup>1</sup> <sup>≥</sup> max*<sup>i</sup>* |*λ<sup>i</sup>* |, *i* = 2, …, *n*; ∑*<sup>i</sup>*=<sup>1</sup> *<sup>n</sup> <sup>λ</sup><sup>i</sup>* <sup>≥</sup>0. *Let <sup>Λ</sup>* <sup>=</sup>*Λ*<sup>0</sup> <sup>∪</sup>*Λ*<sup>1</sup> ∪⋯∪*Λp*<sup>0</sup> *be a pairwise disjoint partition, with <sup>Λ</sup><sup>k</sup>* ={*λ<sup>k</sup>* <sup>1</sup>, *<sup>λ</sup><sup>k</sup>* <sup>2</sup>, …, *<sup>λ</sup>k pk* }; *λ*11 = *λ*1, *k* = 1, …, *p*0, *where Λ*<sup>0</sup> *is realizable, p*<sup>0</sup> *is the number of elements of the list Λ*<sup>0</sup> *and some lists Λk*, *k* = 1, …, *p*0, *can be empty. Let <sup>ω</sup>*1, …, *<sup>ω</sup>p*<sup>0</sup> *be real numbers satisfying* 0 ≤ *ω<sup>k</sup>* ≤ *λ*1, *k* = 1, …, *p*0. *Suppose that*

*i*) *For each k* = 1, …, *p*0, *there exists a list <sup>Γ</sup><sup>k</sup>* ={*ω<sup>k</sup>* , *<sup>λ</sup><sup>k</sup>* <sup>1</sup>, …, *<sup>λ</sup>k pk* } *with ωk* ≥ *Mk* + *mk or ωk* > *Mk* + *mk*, *as in Theorem 6, where*

$$M\_{\boldsymbol{\lambda}} = \max\_{1 \le i \le p\_{\boldsymbol{\lambda}}} \{ \mathbf{0}, \mathbf{Re} \ \boldsymbol{\lambda}\_{\boldsymbol{\lambda}i} + \text{Im } \boldsymbol{\lambda}\_{\boldsymbol{\lambda}i} \}; \ m\_{\boldsymbol{\lambda}} = -\sum\_{i=1}^{p\_{\boldsymbol{\lambda}}} \min \left\{ \mathbf{0}, \text{Re } \boldsymbol{\lambda}\_{\boldsymbol{\lambda}i}, \text{Im } \boldsymbol{\lambda}\_{\boldsymbol{\lambda}i} \right\},$$

*and*

*when all possible Jordan blocksJni*

*when at least one Jordan blockJni*

*M* =Re *λ<sup>i</sup>*

*or if*

*divisors*

we have:

∑*<sup>i</sup>*=<sup>1</sup>

*Suppose that*

*in Theorem 6, where*

*eigenvalues, then*

0 + Im *λ<sup>i</sup>* 0

98 Applied Linear Algebra in Action

*there is at least one Jordan block Jni*

(*λi*

(*λi*

 ll

ll

Let *A*, *X*, *C*, and *Ω* be as in Theorem 3, with

*In particular, if CX* = 0, *A and A* + *XC are similar.*

*i*) *For each k* = 1, …, *p*0, *there exists a list <sup>Γ</sup><sup>k</sup>* ={*ω<sup>k</sup>* , *<sup>λ</sup><sup>k</sup>* <sup>1</sup>, …, *<sup>λ</sup>k pk*

The following result extends Theorem 6:

, *for some i*0 ≤ *n* − 1.

)*, of size ni*

<sup>1</sup> *ii M m* ) , l

*then there exists an n* × *n nonnegative matrix A*∈CS*λ*<sup>1</sup> *with spectrum Λ and with prescribed elementary*

 ll- - ¼ - + + =- *n nn* L

1 2 <sup>2</sup> , ,, , 1. *<sup>k</sup> n n*

( ) <sup>1</sup> , <sup>0</sup>


where *B* = *Ω* + *CX* is an *r* × *r* matrix with eigenvalues *μ*1, …, *μr* (the new eigenvalues) and diagonal entries *λ*1, …, *λr* (the former eigenvalues). Then from a result in [2, Chapter *VI*, Lemma 1.2], if *B* = *Ω* + *CX* and *VAY* have no common eigenvalues, *A* + *XC* is similar to *B* ⊕ *VAY*. Then

**Lemma 4***Let A*, *X*, *Y*, *V*, *C*, *and Ω be as above. If the matrices B* = *Ω* + *CX and VAY have no common*

*J A XC J B J VAY* ( ) () ( ) += Å .

*<sup>n</sup> <sup>λ</sup><sup>i</sup>* <sup>≥</sup>0. *Let <sup>Λ</sup>* <sup>=</sup>*Λ*<sup>0</sup> <sup>∪</sup>*Λ*<sup>1</sup> ∪⋯∪*Λp*<sup>0</sup> *be a pairwise disjoint partition, with <sup>Λ</sup><sup>k</sup>* ={*λ<sup>k</sup>* <sup>1</sup>, *<sup>λ</sup><sup>k</sup>* 2, …, *<sup>λ</sup>k pk*

*λ*11 = *λ*1, *k* = 1, …, *p*0, *where Λ*<sup>0</sup> *is realizable, p*<sup>0</sup> *is the number of elements of the list Λ*<sup>0</sup> *and some lists Λk*, *k* = 1, …, *p*0, *can be empty. Let <sup>ω</sup>*1, …, *<sup>ω</sup>p*<sup>0</sup> *be real numbers satisfying* 0 ≤ *ω<sup>k</sup>* ≤ *λ*1, *k* = 1, …, *p*0.

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

*k k*

*CX UAY CY*

ë û

*VAY*

(*λi*

( )( ) ( ) <sup>2</sup>

*S A XC S*

≥ 2, *are associated to a real eigenvalue λ<sup>i</sup>*

) *, of size ni* ≥ 2, *associated to a real eigenvalue λ<sup>i</sup>* ≥ 0 *with*

> + (6)

)*, of size ni* ≥ 2, *is associated to a real eigenvalue λ<sup>i</sup>* ≥ 0 *with M* = *λ<sup>k</sup>* ≥ 0,

< 0; *or when*


} *with ωk* ≥ *Mk* + *mk or ωk* > *Mk* + *mk*, *as*


};

*ii*) *there exists a p*0 × *p*<sup>0</sup> *nonnegative matrix B with spectrum Λ*<sup>0</sup> *and diagonal entries <sup>ω</sup>*1, …, *<sup>ω</sup>p*<sup>0</sup> .

*Then there exists an n* × *n nonnegative matrix M* ∈CS*λ*<sup>1</sup> *with spectrum Λ and with prescribed elementary divisors.*

#### **Proof**. Let

$$D\_{k} = \begin{bmatrix} \alpha\_{k} & & & & & \\ & \ddots & & & & & \\ & & \lambda\_{k} & & & & \\ & & & \text{Re } \lambda\_{\mathbf{t}(s+1)} & -\text{Im } \lambda\_{\mathbf{t}(s+1)} & & & \\ & & & \text{Im } \lambda\_{\mathbf{t}(s+1)} & \text{Re } \lambda\_{\mathbf{t}(s+1)} & & & \\ & & & \text{Im } \lambda\_{\mathbf{t}(s+1)} & & & \\ & & & & & \ddots & & \\ & & & & & \text{Re } \lambda\_{\mathbf{t}(p\_{k}-1)} & -\text{Im } \lambda\_{\mathbf{t}(p\_{k}-1)} \\ & & & & & \text{Im } \lambda\_{\mathbf{t}(p\_{k}-1)} & \\ & & & & & \text{Im } \lambda\_{\mathbf{t}(p\_{k}-1)} & \\ \end{bmatrix}$$

with spectrum *Γk* and let *Ek* = ∑*Ei*,*<sup>i</sup>* + 1 such that *Dk* + *εEk* is the prescribed *JCF*. Let *Sk* <sup>=</sup> **<sup>e</sup>**|**e**<sup>2</sup> <sup>|</sup> <sup>⋯</sup> <sup>|</sup>**e***pk* . Then *Ak* <sup>=</sup>*Sk* (*Dk* <sup>+</sup> *<sup>ε</sup>Ek* )*Sk* <sup>−</sup>1∈CS*ω<sup>k</sup>* , *k* = 1, …, *p*0, and

$$A = \begin{bmatrix} A\_1 \\ & A\_2 \\ & & \ddots \\ & & & A\_{\rho\_0} \end{bmatrix}.$$

From *i*), there exists an appropriate vector **q***<sup>k</sup> <sup>T</sup>* =(*qk* 0, *qk p*<sup>1</sup> , …, *qk pk* ), with ∑ *j*=0 *pk qkj* =0, such that *Ak* + **eq***<sup>k</sup> <sup>T</sup>* is nonnegative for each *k* = 1, …, *p*0. From Lemma 1, *Ak* <sup>+</sup> **eq***<sup>k</sup> <sup>T</sup>* has the prescribed elementary divisors. Thus, from Theorem 3, *M* = *A* + *XC* is nonnegative with spectrum *Λ* and from Lemma 4, *M* has the prescribed elementary divisors.■

**Example 3***Let Λ* = {7, 1, − 2, − 2, − 1 + 3*i*, − 1 − 3*i*}. *We construct a nonnegative matrix A with spectrum Λ and with elementary divisors*

$$(\left(\mathcal{X}-\mathcal{I}\right), \left(\mathcal{X}-1\right), \left(\mathcal{X}+2\right)^2, \left(\mathcal{X}+1-3i\right), \left(\mathcal{X}+1+3i\right)).$$

*Consider the partition Λ* = *Λ*0 ∪ *Λ*1 ∪ *Λ*2 ∪ *Λ*<sup>3</sup> *with*

$$\begin{aligned} \Lambda\_0 = \{\top, -1+3i, -1-3i\}; \Lambda\_1 = \{-2, -2\}; \Lambda\_2 = \{1\}; \Lambda\_3 = \emptyset \text{ and }\\ \Gamma\_1 = \{\ 4, -2, -2\}; \Gamma\_2 = \{1, 1\}; \Gamma\_3 = \{0\}. \end{aligned}$$

*The matrix*

$$B = \begin{bmatrix} 4 & 0 & 3 \\ \frac{34}{7} & 1 & \frac{8}{7} \\ 0 & 7 & 0 \end{bmatrix}$$

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

$$A = \begin{bmatrix} 0 & 2 & 2 & 0 & 0 & 0 \\ 3 & 0 & 1 & 0 & 0 & 0 \\ 2 & 2 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \end{bmatrix} + \begin{bmatrix} 1 & 0 & 0 \\ 1 & 0 & 0 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 0 & 0 & 0 & 0 & 0 & 0 \\ 34 & 0 & 0 & 0 & 0 & \frac{8}{7} \\ 7 & 0 & 0 & 0 & 0 & \frac{8}{7} \\ 0 & 0 & 0 & 7 & 0 & 0 \end{bmatrix}$$

$$= \begin{bmatrix} 0 & 2 & 2 & 0 & 0 & 3 \\ 3 & 0 & 1 & 0 & 0 & 3 \\ 2 & 2 & 0 & 0 & 0 & 3 \\ \hline 7 & 0 & 0 & 1 & 0 & \frac{8}{7} \\ \hline 34 & 0 & 0 & 0 & 1 & \frac{8}{7} \\ \hline 7 & 0 & 0 & 0 & 7 & 0 & 0 \end{bmatrix}$$

*with the prescribed spectrum and elementary divisors.*
