You are on page 1of 3

Partitioned Matrix

Motivating example:
Let

a11

a12

a1

10000

a 21

a 22

a2

10000

a10000

b12

b1

10000

b22

b2

10000

a10000
b11
b
21
B

b10000

a10000

b10000

10000

b10000 10000

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.

A11

A12

A1

B11
B12

A21
A22
A2 100
B21
B22
A
, B

A100 1 A100 2 A100 100


B100 1 B100 2
where Aij , Bij , i 1,2, ,100; j 1,2, ,100, are 100 100

100

A11
A21

A12
A22

C12
C 22

C100 2

AB

A100 1
C11
C
21

C100 1

A100

A1
A2

B11
B
100
21


A100 100 B100 1
C1 100
C 2 100
C

C100 100
100

B1

100

B2

100

B100

matrices. Then,

B12
B22
B100

100

B1
B2

100

100

B100

100

, where
100

C ij Aik Bkj Ai1 B1 j Ai 2 B2 j Ai


k 1

For instance,

100

B100 j , i 1,2, ,100; j 1,2, ,100.

100

C12 A1k Bk 2 A11 B12 A12 B22 A1


k 1

100

B100 2 .

Thus, we only need to compute the multiplication of the 100 100 matrices.
General case:
Let
a11
a
21
A

amq 1

a12
a22

amq 2

be a mq np matrix and

b11
b
21
B

bnp 1

b12
b22

bnp 2

a1

np

b1

sr

a2 np

amq np

b2 sr

bnp sr

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


A11 A12 A1 p
A
A22 A2 p
21

Aq 1 Aq 2 Aqp
and
B11
B
21
B

B p 1

where Aij are

m n matrices and

B12

B1 r

B2 r
,

B pr
are n s matrices,

B22

Bp 2
B jk

i 1,2, , q; j 1,2, , p, k 1,2, , r.

Then,
A11
A
21

A12
A22

Aq1

Aq 2

C11
C
21

C12

C 22

Cq 2

AB

C q1

A1 p B11 B12
A2 p B21 B22


Aqp B p 1 B p 2
C1r
C 2 r
C mqsr

C qr

where
2

B1r
B2 r

B pr

Cij Aik Bkj Ai1 B1 j Ai 2 B2 j Ai p B pj , i 1,2, , q; j 1,2, , r ,


k 1

are

m s matrices.

Example:
Let

A44

1 0 1
0 2 3


2 0 4

0 1 0

0
1
A
11
A21
0

A12
A22

and

B46

2
0

0
0 1
1 1
1
1 1 2
2
B
11
B21
3
0 0
1
0

1 2 1
0 1

B12
.
B22

, where
1
A11
0

0
1
, A12

2
3

0
2
, A21

1
0

0
4
, A22

1
0

0
3

and
2 0 0
1 1 1
1 3 0
0 1 0
B11
, B12
, B21
, B22

.
0 1 1
1 2 2
3 1 2
1 0 1

Then, the multiplication of A and B is


A
A44 B46 C 46 11
A21
C
11
C 21

A12 B11
A22 B21

3
6

C12


C 22
0

3
12

12
2

A B A12 B21
11 11

B22
A21 B11 A22 B21
0 1
2
1
0 3 7
5

0 2 2 2

7 2
2
1
B12

A11 B12 A12 B22

A21 B12 A22 B22

You might also like