# Why is the Kronecker sum defined for square matrices?

Background

From Wikipedia, if A is an $$m\times n$$ matrix and B is a $$p\times q$$ matrix, the the Kronecker product $$\mathbf A\otimes \mathbf B$$ is the $$mn\times nq$$ block matrix

$$\mathbf A\otimes \mathbf B= \begin{pmatrix} a_{11} \mathbf B & \cdots & a_{1n}\mathbf B \\ \vdots & \ddots & \vdots \\ a_{m1} \mathbf B& \cdots & a_{mn}\mathbf B \end{pmatrix}$$

Conventionality, the Kronecker sum is defined as follows: if A is an $$m\times m$$ matrix and B is an $$n\times n$$ matrix, then

$$\mathbf A\oplus \mathbf B=\mathbf A\otimes \mathbf I_n+\mathbf I_m\otimes \mathbf B$$

which can also be expressed in terms of the matrix exponential

$$\exp(\mathbf A\oplus \mathbf B)=\exp(\mathbf A) \otimes \exp(\mathbf B)$$

What I did

I define the Kronecker sum as follows:

$$\mathbf A\oplus \mathbf B= \begin{pmatrix} a_{11} +\mathbf B & \cdots & a_{1n}+\mathbf B \\ \vdots & \ddots & \vdots \\ a_{m1} +\mathbf B& \cdots & a_{mn}+\mathbf B \end{pmatrix}$$

This worked for my problems where A and B were row and column vectors, respectively.

In order to test the general case I took A as an $$m\times n$$ matrix and B as an $$p\times q$$ matrix, where $$(m,n,p,q)$$ are randomly selected, and I populated these matrices with random complex numbers.

I then calculated $$\mathbf A\oplus \mathbf B$$ with my formulation and compared it with (the ordinary exponential)

$$\mathbf A\oplus \mathbf B=\ln(e^{\mathbf A} \otimes e^{\mathbf B})$$

In all cases the results were identical to with machine precision. Which bring us to the question: why is the Kronecker sum defined for square matrices?

Computation details

For all calculations $$(m,n,p,q)\in[50\ 125]$$ in order to run the calculations on a GPU, which was better than six times faster than the CPU.

• There are a couple of type mismatches in what you've written: $a_{ij}+\mathbf{B}$ doesn't make sense on its own and should match with $a_{ij}\mathbf{I}_{m}+\mathbf{B}$ in the square case, and matrix exponentials and logarithms don't make sense for non-square matrices. – K B Dave Mar 8 at 20:32
• Non-square matrices neither have exponentials, nor can they get identity matrices added to them. So I am not sure how you define Kronecker sums of them. – darij grinberg Mar 8 at 20:32
• @KBDave I'm a little out of my element here. if $a_{ij}\mathbf B$ makes sense, why not $a_{ij}+\mathbf B$? This is a constant added to each term in B. As for the logarithm and the exponential, again, the meaning is term-by-term of the elements of the matrix. The fact is, I did the calculation. In the case of my formulation I used a Kronecker sum algorithm and substituted a plus for a multiplication. (continues) – Cye Waldman Mar 8 at 20:47
• @KBDave In the actual problems I was solving I know I get the correct answers because in the one case I'm solving for the closest points on two curves, and in the other I'm iterating for the inscribed circle in random shaped curves. In both cases there's no ambiguity as to what the results mean. – Cye Waldman Mar 8 at 20:48
• @RodrigodeAzevedo Aha, I see what you mean. It's a typo where I have inadvertently switched the m and n on the I vectors. I'll correct it. – Cye Waldman Mar 9 at 1:14

## 1 Answer

Okay, I see what you did. Your $$\oplus$$ and $$\otimes$$ yield take input tuples of size $$a$$ and $$b$$ and produce an $$ab$$-tuple given by all elementwise sums/products (although you've phrased their definition as though they acted on matrices). With that in mind, it's not surprising that elementwise exponentiation transforms $$\oplus$$ into $$\otimes$$.

However, that means that your $$\oplus$$ is not the Kronecker sum: it does not coincide with the usual definition of Kronecker sum, and it does not transform into the Kronecker product under matrix exponentiation.

• Thanks, I get it now. So, can we agree that I haven't done anything wrong, just something different, which solves a different problem. Which brings me to my previous post, math.stackexchange.com/questions/3139117/…. There I asked if the Kronecker product w.r.t. addition (i.e., my definition) has its own name and symbol? – Cye Waldman Mar 8 at 22:54
• Follow up comment. As I have been writing this up for something else I decided to give it its own name. Please see my answer to this other question: math.stackexchange.com/questions/3180427/…. – Cye Waldman Apr 9 at 23:45