Decomposing a symmetric matrix as a sum of nilpotent matrices

237 Views Asked by At

Assume that a real-valued symmetric matrix $M$ with trace zero can be written as $$ M = A + A^T, $$ with $A^2=0$.


Given that $M$ is known, how (if possible) can $A$ be found?


The diagonal elements of $A$ are just half those of $M$, that is $$ A_{ii}=M_{ii}/2. $$

But for the non diagonal ones, considering only the decomposition above, the number of unknowns is the double of the number of equations: $$ M_{ij}=A_{ij}+A_{ji}, $$ with $i\neq j$, implying that is not possible to get an unique solution.

Using the nilpotency property of $A$, nonlinear equations such as $M^2=AA^T+A^TA$ or $A^TMA=0$ can be generated, but I can't see how using these nonlinear relations can lead to an unique solution.

2

There are 2 best solutions below

9
On BEST ANSWER

Let $M=2S$. If $M=A+A^T$, we must have $A=S+K$ for some skew-symmetric $K$. The equation $A^2=0$ is then equivalent to $S^2+SK+KS+K^2=0$, and further equivalent to the system of equations \begin{cases} S^2+K^2=0,\\ SK+KS=0 \end{cases} because $S^2+K^2$ is symmetric but $SK+KS$ is skew-symmetric.

By orthogonal diagonalisation, we may assume that $$ S=U\left[\pmatrix{c_1I_{p_1}\\ &-c_1I_{q_1}}\oplus\cdots\oplus \pmatrix{c_kI_{p_k}\\ &-c_kI_{q_k}}\oplus0_{r\times r}\right]U^T,\tag{1} $$ where $U$ is real orthogonal, $c_1>\cdots>c_k>0$. It follows from $SK+KS=0$ that $$ K=U\left[\pmatrix{0&-Y_1^T\\ Y_1&0}\oplus\cdots\oplus \pmatrix{0&-Y_k^T\\ Y_k&0}\oplus Z\right]U^T,\tag{2} $$ where the size of each $Y_i$ is $p_i\times q_i$ and $Z$ is an $r\times r$ skew-symmetric matrix. But then the equation $S^2+K^2=0$ implies that $Y_i^TY_i=c_i^2I_{p_i},\ Y_iY_i^T=c_i^2I_{q_i}$ and $Z^2=0$.

Since $Y_i^TY_i$ and $Y_iY_i^T$ have the same ranks, in order that a solution exists, we must have $p_i=q_i$ for each $i$, i.e. a solution exists only if the set of all nonzero eigenvalues (if any) of $S$ can be divided into pairs of the form $(c,-c)$. This condition is also sufficient: when it is satisfied, i.e. when $p_i=q_i$ in $(1)$ for every $i$, the general solution $K$ is given by $(2)$, with $Z=0_{r\times r}$ and each $Y_i$ equal to $c_iQ_i$ for some real orthogonal matrix $Q_i$ of size $p_i$.


Numerical example. Suppose we are given the following real symmetric matrix $M$ with zero trace:

M = [...
   0.3986807  -0.0965229   0.2286415   0.1428613   0.3220341  -0.0577869   0.2251654;...
  -0.0965229  -0.4517912  -0.1671502  -0.2956311  -0.0243394  -0.3760836  -0.1716604;...
   0.2286415  -0.1671502   0.1048220   0.0205124   0.1973023  -0.1249165   0.1015693;...
   0.1428613  -0.2956311   0.0205124  -0.0922200   0.1448577  -0.2350062   0.0163267;...
   0.3220341  -0.0243394   0.1973023   0.1448577   0.2540705  -0.0026533   0.1950985;...
  -0.0577869  -0.3760836  -0.1249165  -0.2350062  -0.0026533  -0.3118486  -0.1288061;...
   0.2251654  -0.1716604   0.1015693   0.0163267   0.1950985  -0.1288061   0.0982866];

Let $S=M/2$. We may perform an orthogonal diagonalisation on $S$ and sort the eigenvalues in decreasing magnitudes:

S = M./2;

% Orthogonal diagonalisation: S=U*diag(lambda)*U'
[U,D,V]=svd(S); lambda=diag(U'*S*U);

% Sort the eigenvalues
[v,I]=sort(lambda-i); I=flipud(I); U=U(:,I); lambda=lambda(I);

The eigenvalues of $S$ are given by

5.0000e-01  -5.0000e-01  -3.7116e-08  -2.9489e-08   2.9168e-08   1.8413e-08   2.6035e-09

They cannot be grouped into pairs of the form $(c,-c)$, probably due to rounding errors. So, let us treat the last five eigenvalues of $S$ (which are $<10^{-7}$ in magnitudes) as zeroes. That is, we suppose $S$ is actually $$ S=U\left[\pmatrix{\frac12\\ &-\frac12}\oplus0_{5\times5}\right]U^T. $$ Compared with $(1)$, we have $k=1,\ c_1=\frac12,\ p_1=q_1=1$ and $r=5$. Thus by $(2)$, $$ K=U\left[\pmatrix{0&-c_1Q_1^T\\ c_1Q_1&0}\oplus0_{5\times5}\right]U^T, $$ where $Q_1$ is a real orthogonal matrix of size $p_1=1$, meaning that $Q_1=\pm1$. In other words, $$ K=\pm U\left[\pmatrix{0&-\frac12\\ \frac12&0}\oplus0_{5\times5}\right]U^T $$ and we may take $A=S+K$ or $S-K$:

n = size(M,1);
% Ys is the direct sum of subblocks of the form [0 -Y_i';Y_i 0]
Ys = zeros(n,n); Ys(1:2,1:2)=lambda(1)*[0 -1;1 0];
K = U * Ys * U'
A1 = S+K;  % first solution
A2 = S-K;  % second solution

E.g. the solution $A=S+K$ is found to be

A1 =

   0.199340   0.169360   0.165522   0.190988   0.136456   0.149759   0.166235
  -0.265883  -0.225896  -0.220776  -0.254743  -0.182007  -0.199751  -0.221728
   0.063119   0.053626   0.052411   0.060474   0.043207   0.047420   0.052637
  -0.048127  -0.040889  -0.039962  -0.046110  -0.032944  -0.036156  -0.040134
   0.185578   0.157668   0.154095   0.177802   0.127035   0.139420   0.154759
  -0.207546  -0.176332  -0.172336  -0.198850  -0.142073  -0.155924  -0.173079
   0.058930   0.050067   0.048933   0.056461   0.040340   0.044273   0.049143

and you may verify that both conditions $M=A+A^T$ and $A^2=0$ are satisfied:

% If M=A+A^T and A^2=0, the following quantities should be nearly zero
[max(max(abs(A1+A1'-M))), max(max(abs(A1^2)));...
 max(max(abs(A2+A2'-M))), max(max(abs(A2^2)))]

   2.7756e-17   7.8166e-09
   2.7756e-17   7.8166e-09
0
On

I just read the user1551's solution (that is perfect as usual). We can also say

since $S,K^2$ commute, we may assume (up to an orthogonal change of basis) that $S=diag((\lambda_i)),K^2=diag((-\lambda_i^2))$.

Since $K,S^2$ commute, we may assume (up to a permutation of the new basis) that $S^2=diag(\lambda_1^2 I_{i_1},\cdots,\lambda_k^2 I_{i_k})$, where the $(\lambda_i)$ are distinct and $K=diag(K_1,\cdots,K_k)$, where $K_i$ is skew with the correct dimension. After, it's not difficult to conclude (as user1551) that $S=Pdiag(S_1,\cdots,S_k,0_{n-2k})P^T$ where $P=[q_1,q'_1\cdots,q_k,q'_k,\cdots]$ is orthogonal and $S_i=\begin{pmatrix}\lambda_i&0\\0&-\lambda_i\end{pmatrix}$ (where the $(\lambda_i)$ are not necessarily distinct).

Then, a particular solution is $K=Pdiag(L_1,\cdots,L_k,0_{n-2k})P^T$ where $L_i=\begin{pmatrix}0&\lambda_i\\-\lambda_i&0\end{pmatrix}$.

In other words, if $S=\sum_{i=1}^k\lambda_i(q_i{q_i}^T-q'_i{q'_i}^T)$, then a particular solution is $K=\sum_{i=1}^k \lambda_i (q_i{q'_i}^T-q'_i{q_i}^T)$.