# Revert problem in Kronecker tensor product

I have a question related to reverting kron tensor product. As We can see the in below example:

>> X

X =

0     1
1     0

>> Z

Z =

1     0
0    -1

>> D=kron(X,Z)

D =

0     0     1     0
0     0     0    -1
1     0     0     0
0    -1     0     0


So the problem is: -If We know D, also know Z, How can We calculate X? Are there any cmd to do it in MATLAB?

Simply, As I do for some specific case, I investigate X(i,j)*Y --> So I got X(i,j). But I need to solve in general case.

I am looking forward to hearing from you.

• Welcome to math.SE: since you are new, I wanted to let you know a few things about the site. In order to get the best possible answers, it is helpful if you say in what context you encountered the problem, and what your thoughts on it are; this will prevent people from telling you things you already know, and help them give their answers at the right level. For some basic information about writing math at this site see e.g. here, here, here and here. – Alex Provost Jul 1 '15 at 15:17
• Are you looking for just the $2\times 2$ case (i.e. with $X,Z$ being $2\times 2$ matrices) or the general $n\times n$ case? – Winther Jul 1 '15 at 15:31
• In general the Kronecker Product is not invertible so it's hard to come up with a useful numerical algorithm that works in general. When it is uniquely invertible, see this answer for how you can invert it. – Winther Jul 1 '15 at 15:36
• Thanks for your response. I need to solve in general case. As We know: If X(a×b) and Y(c×d) so kron(X,Y) will have size (ac)×(bd) – Hai Duc Jul 1 '15 at 15:43

Given $C=A\otimes B$,
Calculate: $D=BA^\dagger$. See Neil de Beaudrap's answer for how to get $D$ without knowing $B$ or $A$
Use $D$ to get $kB$ and $A/k$ where $k$ is a scalar.
Remember that $kA \otimes (1/k)B = A\otimes B$ for all $k$,
so given $A\otimes B$, you cannot possibly know exactly what $A$ and $B$ were, you can only know them up to the factors involving $k$.