Geography Reference
In-Depth Information
Appendix A
Matrix multiplication
h e multiplication of a matrix by another matrix is illustrated in Figure A.1. In this
case, the matrix has been multiplied by a copy of itself that has been l ipped along its
diagonal (this new matrix is called the transpose of the original matrix).
Each entry in the multiplied matrix is the sum of values in the cell's row in the origi-
nal matrix multiplied by the values in the cell's column in the transpose of the matrix.
For example, the value 251 (top-let cell) in the multiplied matrix is obtained from:
(1 ¥ 1) + (5 ¥ 5) + (9 ¥ 9) + (12 ¥ 12) = 1 + 25 + 81 + 144 = 251
As another example, the value 309 (second row from the top, second column) of the
multiplied matrix is obtained from:
(2 ¥ 2) + (6 ¥ 6) + (10 ¥ 10) + (13 ¥ 13) = 4 + 36 + 100 + 169 = 309
h e cells used in this example are highlighted in Figure A.2.
159 2
26 0 3
3
1
2
3
4
251
278
305
332
5
6
7
8
278
309
340
371
x
=
7
11
14
9
10
11
12
305
340
375
410
4
8
12
15
12
13
14
15
332
371
410
449
Original matrix
Flipped matrix
(transpose)
Multiplied matrix
Figure A.1 Matrix multiplication.
251
278
305
332
159 2
26 0 3
3
1
2
3
4
5
6
7
8
278
309
340
371
x
=
9
10
11
12
305
340
375
410
7
11
14
4
8
12
15
12
13
14
15
332
371
410
449
Original matrix
Flipped matrix
(transpose)
Multiplied matrix
Figure A.2 Matrix multiplication: selection of cells for the output cell in column 2, row 2.
Search WWH ::




Custom Search