Tanh transformation of correlation matrix

correlationcovariancelinear algebrapositive definite

Let a symmetric positive definite matrix $\boldsymbol{S}\in\mathbb{R}^{d\times d}$ be given with ones on the main diagonal. All other entries can assumed to be $\in (-1,1)$

Consider the following transformation: tanh is applied on the off-diagonal entries and the diagonal entries stay equal to $1$. Is the resulting matrix again positive definite?

If we do not require that the diagonal entries are equal $1$, it does not work, see tanh transformation of symmetric positive definite matrix

Now I am wondering if it works if the diagonal entries of the original matrix are equal to $1$

Best Answer

What follows is a partial answer with additional assumption that all off-diagonal entries of $S$ are nonpositive. In this case we have $$S=I-A,\qquad a_{ii}=0,\ a_{ij}\ge 0$$ We are interested in the nontrivial case when $A\neq 0.$ The condition $I-A\ge 0$ means that $$\langle Ax,x\rangle \le \langle x,x\rangle,\quad x\in \mathbb{R}^d $$ therefore it is equivalent to the property that the greatest eigenvalue $\lambda_\max$ of $A$ satisfies $\lambda_\max\le 1.$ We want to show that $\|A\|=\lambda_\max\le 1.$

For $x=(x_1,x_2,\ldots,x_d)^T$ let $|x|=(|x_1|,|x_2|,\ldots, |x_d|)^T.$ By well known formulas concerning symmetric matrices we have $$\|A\|=\max_{x\neq 0}{|\langle Ax,x\rangle|\over \langle x,x\rangle }\\ \lambda_\max =\max_{x\neq 0}{\langle Ax,x\rangle\over \langle x,x\rangle }=\max_{x\neq 0}{\langle A|x|,|x|\rangle\over \langle x,x\rangle }=\|A\|$$ (the second equality in the second line follows from $a_{ij}\ge 0$).

Let $B=\tanh A$ denote the matrix with entries $b_{ij}=\tanh(a_{ij}).$ As $0\le \tanh x\le x,$ for $x\ge 0,$ we get $$0\le b_{ij}\le a_{ij}$$ Thus $$\|B\|=\max_{x\neq 0}{\langle B|x|,|x|\rangle\over \langle x,x\rangle } \le \max_{x\neq 0}{\langle A|x|,|x|\rangle\over \langle x,x\rangle }=\|A\|\le 1$$ Therefore $-I\le B\le I.$ In particular we get $$0\le I-B=I-\tanh(A)=I+\tanh(-A)$$

Remark The proof covers also the case $S=I+A,$ $a_{ij}\ge 0,$ with assumption $I-A\ge 0$ (different from $S\ge 0$).

Related Question