Tridiagonal matrix power with negative diagonal

I have a tridiagonal matrix with negative diagonal and and non-negative off-diagonal elements where every row sums to zero (it is the generator to an M/M/n/n queue). My experiments indicate that $$|A|^p$$ = $$|A^p|$$, where $$|\cdot|$$ is the absolute value of every element, but I am not able to prove this.

• @user8675309 How do you get $\exp(A)=\exp|A|$ ? Do you think it follows from $|A^p|=|A|^p$ ? It is not true for numbers. May 22 at 18:03
• @RyszardSzwarc I am not sure I get your point. If $|A^p| = |A|^p$ then I guess that $exp(A) = exp|A|$. May 22 at 18:59
• @AndreasDahlberg $e^{-1}\neq e^{|-1|}.$ May 22 at 19:03
• @RyszardSzwarc Yes, generally it is not true but I am interested in the case when $A$ is the generator to an M/M/n/n queue. May 22 at 19:15

Let $$D$$ denote the diagonal matrix with entries $$(-1)^i$$ on the main diagonal, i.e. $$d_{ij}=\begin{cases}(-1)^i & j=i\\ 0 & j\neq i \end{cases}$$ Observe that the matrix $$DAD$$ has nonpositive entries and $$|DAD|=|A|.$$ Therefore $$|A|=-DAD.$$ We have $$D^2=I.$$ Hence $$(DAD)^k=DA^kD.$$ Therefore $$|(DAD)^k|=|DA^kD|=|A^k|.$$ Thus $$|A|^k=(-DAD)^k=(-1)^kDA^kD=|DA^kD|=|A^k|$$
Remark The assumption that the rows sum up to $$0$$ is not necessary for the conclusion.