You are on page 1of 4

1

Partitioned Matrix

Motivating example:

Let
(
(
(
(

=
10000 10000 1 10000 1 10000
10000 2 22 21
10000 1 12 11
a a a
a a a
a a a
A

,
(
(
(
(

=
10000 10000 1 10000 1 10000
10000 2 22 21
10000 1 12 11
b b b
b b b
b b b
B


be 10000 10000 matrices. It might be very time consuming and sometimes
impossible to calculate the multiplication of the two matrices since the memory
in computer to store the two matrices are very large. To solve this problem, We
can partition the matrices A and B in a small block of 100 100 matrices.


(
(
(
(

=
100 100 2 100 1 100
100 2 22 21
100 1 12 11
A A A
A A A
A A A
A

,
(
(
(
(

=
100 100 2 100 1 100
100 2 22 21
100 1 12 11
B B B
B B B
B B B
B

,
where , 100 , , 2 , 1 ; 100 , , 2 , 1 , , = = j i B A
ij ij
are 100 100 matrices. Then,
C
C C C
C C C
C C C
B B B
B B B
B B B
A A A
A A A
A A A
AB
=
(
(
(
(

=
(
(
(
(

(
(
(
(

=
100 100 2 100 1 100
100 2 22 21
100 1 12 11
100 100 2 100 1 100
100 2 22 21
100 1 12 11
100 100 2 100 1 100
100 2 22 21
100 1 12 11


, where
2
. 100 , , 2 , 1 ; 100 , , 2 , 1 ,
100 100 2 2 1 1
100
1
= = + + + = =

=
j i B A B A B A B A C
j i j i j i kj
k
ik ij

For instance,
2 100 100 1 22 12 12 11 2
100
1
1 12
B A B A B A B A C
k
k
k
+ + + = =

=

.
Thus, we only need to compute the multiplication of the 100 100 matrices.

General case:
Let
(
(
(
(
(

=
np mq mq mq
np
np
a a a
a a a
a a a
A
2 1
2 22 21
1 12 11


be a np mq matrix and
(
(
(
(
(

=
sr np np np
sr
sr
b b b
b b b
b b b
B
2 1
2 22 21
1 12 11


be a sr np matrix. We can partition the two matrices by
(
(
(
(
(

=
qp q q
p
p
A A A
A A A
A A A
A

2 1
2 22 21
1 12 11

and
(
(
(
(
(

=
pr p p
r
r
B B B
B B B
B B B
B

2 1
2 22 21
1 12 11
,
3
where
ij
A
are n m matrices and
jk
B
are s n matrices,
. , , 2 , 1 , , , 2 , 1 ; , , 2 , 1 r k p j q i = = =


Then,
sr mq
qr q q
r
r
pr p p
r
r
qp q q
p
p
C
C C C
C C C
C C C
B B B
B B B
B B B
A A A
A A A
A A A
AB

=
(
(
(
(
(

=
(
(
(
(
(

(
(
(
(
(

2 1
2 22 21
1 12 11
2 1
2 22 21
1 12 11
2 1
2 22 21
1 12 11


where

, , , 2 , 1 ; , , 2 , 1 ,
2 2 1 1
1
r j q i B A B A B A B A C
pj p i j i j i kj
p
k
ik ij
= = + + + = =

=

are s m matrices.

Example:

Let
(

=
(
(
(
(
(
(

22 21
12 11
4 4
3
0
1
0
0
4
3
1
1
0
2
0
0
2
0
1
A A
A A
A



and
4
(

=
(
(
(
(
(
(

22 21
12 11
6 4
1
0
2
1
0
1
2
1
1
0
1
1
2
0
1
0
1
3
1
0
3
1
0
2
B B
B B
B


.
, where
(

=
(

=
(

=
(

=
3 0
0 4
,
1 0
0 2
,
1 3
0 1
,
2 0
0 1
22 21 12 11
A A A A


and

(

=
(


=
(


=
(

=
1 0 1
0 1 0
,
2 1 3
0 3 1
,
2 2 1
1 1 1
,
1 1 0
0 0 2
22 21 12 11
B B B B
.

Then, the multiplication of A and B is
(
(
(
(
(
(

=
(

=
(

+ +
+ +
=
(

= =

1
2
5
1
2
2
7
2
2
2
3
1
7
0
0
0
2
12
12
3
9
0
6
3

22 21
12 11
22 22 12 21 21 22 11 21
22 12 12 11 21 12 11 11
22 21
12 11
22 21
12 11
6 4 6 4 4 4


C C
C C
B A B A B A B A
B A B A B A B A
B B
B B
A A
A A
C B A

You might also like