Skip to content
Back to formatted view

Raw Message

Message-ID: <4DEB8783.8060405@gmail.com>
Date: 2011-06-05T13:41:23Z
From: Duncan Murdoch
Subject: kronecker sum
In-Reply-To: <BANLkTikj_swLDETmrVQanZMAhxbpu1iDdw@mail.gmail.com>

On 11-06-05 9:36 AM, Lara Poplarski wrote:
> Dear All,
>
> Could someone please suggest how to find the Kronecker sum of two 2x2
> matrices,
> i.e. given two matrices:
>
> -A  A
> a  -a
>
> and
>
> -B   B
> b  -b
>
> I need:
>
>   -A-B    A       B      0
>   a     -a-B     0      B
>   b        0     -A-b  A
>   0        b       a    -a-b
>

Why not do it in the obvious way?

A <- matrix1[1,2]
a <- matrix1[2,1]
B <- matrix2[1,2]
b <- matrix2[2,1]
matrix(c(-A-B,a,b,0,  A,-a-B,0,b, B,0,-A-b,a, 0,B,A,-a-b), 4,4)

Duncan Murdoch