How to organize, add and multiply matrices - Bill Shillito

如何整理、相加、和相乘矩陣 - Bill Shillito

542,930 views

2013-03-04 ・ TED-Ed


New videos

How to organize, add and multiply matrices - Bill Shillito

如何整理、相加、和相乘矩陣 - Bill Shillito

542,930 views ・ 2013-03-04

TED-Ed


請雙擊下方英文字幕播放視頻。

00:00
Translator: Andrea McDonough Reviewer: Bedirhan Cinar
0
0
7000
譯者: Anny Chung 審譯者: Jephian Lin
00:14
By now, I'm sure you know
1
14020
1548
你大概知道
00:15
that in just about anything you do in life,
2
15568
1972
生活中幾乎任何工作
00:17
you need numbers.
3
17540
1706
都需要數字
00:19
In particular, though,
4
19246
1027
尤其是
00:20
some fields don't just need a few numbers,
5
20273
2229
有些領域不只需要一些數字
00:22
they need lots of them.
6
22502
1720
他們需要很多數字
00:24
How do you keep track of all those numbers?
7
24222
2026
要如何整理這麼多數字呢?
00:26
Well, mathematicians dating back
8
26248
1916
數學家早在古代中國
00:28
as early as ancient China
9
28164
1965
數學家早在古代中國
00:30
came up with a way to represent
10
30129
1442
就已發明用來同時表現
00:31
arrays of many numbers at once.
11
31571
2577
許多數字的辦法
00:34
Nowadays we call such an array a "matrix,"
12
34148
3174
現在我們叫這個組合方法「矩陣」
00:37
and many of them hanging out together, "matrices".
13
37322
2737
現在我們叫這個組合方法「矩陣」
00:40
Matrices are everywhere.
14
40059
2561
矩陣無所不在 (譯註:矩陣英文即電影駭客任務中的母體。)
00:42
They are all around us,
15
42620
1935
環繞我們四周
00:44
even now in this very room.
16
44555
3336
即使是現在,在這房間裡
00:47
Sorry, let's get back on track.
17
47891
1893
抱歉,我們回歸正題
00:49
Matrices really are everywhere, though.
18
49784
1978
矩陣真的無所不在
00:51
They are used in business,
19
51762
1311
它們被使用於商業
00:53
economics,
20
53073
1125
經濟
00:54
cryptography,
21
54198
790
00:54
physics,
22
54988
1210
密碼學
物理
00:56
electronics,
23
56198
1103
電子
00:57
and computer graphics.
24
57301
1968
和電腦影像技術
00:59
One reason matrices are so cool
25
59269
2268
矩陣很酷的原因之一
01:01
is that we can pack so much information into them
26
61537
2777
是它們可以集中很多資訊
01:04
and then turn a huge series of different problems
27
64314
2274
並將一系列不同的問題
01:06
into one single problem.
28
66588
2963
整理成一個問題
01:09
So, to use matrices, we need to learn how they work.
29
69551
3711
使用矩陣前,我們需要了解它的運作方式
01:13
It turns out, you can treat matrices
30
73262
1910
其實,矩陣和普通數字差不多
01:15
just like regular numbers.
31
75172
1510
其實,矩陣和普通數字差不多
01:16
You can add them,
32
76682
627
你可以將它們相加
01:17
subtract them,
33
77309
729
相減
01:18
even multiply them.
34
78038
1660
或相乘
01:19
You can't divide them,
35
79698
1217
但你不能將它們相除
01:20
but that's a rabbit hole of its own.
36
80915
1975
那個課題有點複雜
01:22
Adding matrices is pretty simple.
37
82890
2082
矩陣相加很簡單
01:24
All you have to do is add the corresponding entries
38
84972
2223
你只要將其中的元素相加
01:27
in the order they come.
39
87195
1402
依照原來的順序
01:28
So the first entries get added together,
40
88597
1860
所以第一個元素相加
01:30
the second entries,
41
90457
819
第二個元素
01:31
the third,
42
91276
687
01:31
all the way down.
43
91963
1531
第三個
以此類推
01:33
Of course, your matrices have to be the same size,
44
93494
2246
當然,矩陣必須是相同的大小
01:35
but that's pretty intuitive anyway.
45
95740
2077
這應該不難理解
01:37
You can also multiply the whole matrix
46
97817
2044
你也可以將整個矩陣
01:39
by a number, called a scalar.
47
99861
2346
以一個數字,或純量,相乘
01:42
Just multiply every entry by that number.
48
102207
2976
只要將每個元素乘以那個數字即可
01:45
But wait, there's more!
49
105183
1990
但等等,還有更多!
01:47
You can actually multiply one matrix by another matrix.
50
107173
4200
你還可以將兩個矩陣相乘
01:51
It's not like adding them, though,
51
111373
1224
但是和相加不太一樣
01:52
where you do it entry by entry.
52
112597
1589
不是一個一個元素來
01:54
It's more unique
53
114186
1210
它比較特別
01:55
and pretty cool once you get the hang of it.
54
115396
2070
學會了之後其實挺有趣的
01:57
Here's how it works.
55
117466
1150
這就是它的原理
01:58
Let's say you have two matrices.
56
118616
2437
比如說你有兩個矩陣
02:01
Let's make them both two by two,
57
121053
1788
都是 2×2 的矩陣
02:02
meaning two rows by two columns.
58
122841
2544
也就是二列二行
02:05
Write the first matrix to the left
59
125385
2205
先將第一個矩陣寫在左邊
02:07
and the second matrix goes next to it
60
127590
1885
第二個矩陣在旁邊
02:09
and translated up a bit,
61
129475
1310
稍微偏上面
02:10
kind of like we are making a table.
62
130785
1791
像是在做表格一樣
02:12
The product we get when we multiply the matrices together
63
132576
2825
矩陣相乘的乘積
02:15
will go right between them.
64
135401
1496
將在這兩個矩陣中間
02:16
We'll also draw some gridlines to help us along.
65
136897
3744
我們來畫一些格線來做輔助
02:20
Now, look at the first row of the first matrix
66
140641
3562
先看看第一個矩陣的第一列
02:24
and the first column of the second matrix.
67
144203
2748
和第二個矩陣的第一行
02:26
See how there's two numbers in each?
68
146951
2011
看到它們各有兩個數字嗎?
02:28
Multiply the first number in the row
69
148962
2457
將第一行的第一個數字
02:31
by the first number in the column:
70
151419
2331
與第一列的第一個數字相乘
02:33
1 times 2 is 2.
71
153750
2180
1 乘 2 等於 2
02:35
Now do the next ones:
72
155930
1617
接下來將下一對相乘
02:37
3 times 3 is 9.
73
157547
1922
3 乘 3 等於 9
02:39
Now add them up:
74
159469
1571
接下來將它們相加
02:41
2 plus 9 is 11.
75
161040
2411
2 加 9 等於 11
02:43
Let's put that number in the top-left position
76
163451
2587
我們來把這個答案放在左上位置
02:46
so that it matches up with the rows and columns
77
166038
2015
讓它和我們剛剛利用的行列對齊
02:48
we used to get it.
78
168053
1255
讓它和我們剛剛利用的行列對齊
02:49
See how that works?
79
169308
1417
看清楚了嗎?
02:50
You can do the same thing to get the other entries.
80
170725
2844
你可以用相同方法得到其他的元素
02:53
-4 plus 0 is -4.
81
173569
4009
-4 加 0 是 -4
02:57
4 plus -3 is 1.
82
177578
3961
4 加 -3 是 1
03:01
-8 plus 0 is -8.
83
181539
3608
-8 加 0 是 -8
03:05
So, here's your answer.
84
185147
2236
所以這就是答案
03:07
Not all that bad, is it?
85
187383
1835
還不賴吧?
03:09
There's one catch, though.
86
189218
1699
但是有一個限制
03:10
Just like with addition,
87
190917
1588
就像是矩陣加法
03:12
your matrices have to be the right size.
88
192505
2760
你的矩陣必須是正確的大小
03:15
Look at these two matrices.
89
195265
2662
看看這兩個矩陣
03:17
2 times 8 is 16.
90
197927
2761
2 乘 8 是 16
03:20
3 times 4 is 12.
91
200688
2746
3 乘 4 是 12
03:23
3 times
92
203434
1675
3 乘
03:25
wait a minute,
93
205109
1698
等等
03:26
there are no more rows in the second matrix.
94
206807
2069
第二個矩陣中沒有更多列了
03:28
We ran out of room.
95
208876
1452
空間不夠
03:30
So, these matrices can't be multiplied.
96
210328
2908
所以這兩個矩陣無法相乘
03:33
The number of columns in the first matrix
97
213236
2721
第一個矩陣中的行數
03:35
has to be the same as the number of rows in the second matrix.
98
215957
3552
必須等於第二個矩陣中的列數
03:39
As long as you're careful
99
219509
1013
但是只要你小心這點
03:40
to match up your dimensions right, though,
100
220538
1847
確保行列數正確
03:42
it's pretty easy.
101
222385
1302
剩下的其實不難
03:43
Understanding matrix multiplication
102
223687
1812
學習矩陣乘法
03:45
is just the beginning, by the way.
103
225499
1491
只是個開始而已
03:46
There's so much you can do with them.
104
226990
1707
矩陣的用處還有更多
03:48
For example, let's say you want
105
228697
1802
比如說
03:50
to encrypt a secret message.
106
230499
1922
如果你想要傳遞秘密訊息
03:52
Let's say it's "Math rules".
107
232421
2167
像是「數學超棒(Math rules)」
03:54
Though, why anybody would want to keep this a secret
108
234588
2329
雖然我無法想像 為何有人會想把這當做秘密
03:56
is beyond me.
109
236917
1366
雖然我無法想像 為何有人會想把這當做秘密
03:58
Letting numbers stand for letters,
110
238283
1358
若將字母以數字代替
03:59
you can put the numbers in a matrix
111
239641
1719
你可將數字整理成矩陣
04:01
and then an encryption key in another.
112
241360
2544
再將加密金鑰設為另一個矩陣
04:03
Multiply them together
113
243904
881
將他們相乘
04:04
and you've got a new encoded matrix.
114
244785
2333
就會得到一個受密碼保護的矩陣
04:07
The only way to decode the new matrix
115
247118
2229
將新矩陣解碼並閱讀秘密訊息
04:09
and read the message
116
249347
1173
的唯一方法
04:10
is to have the key,
117
250520
1608
就是擁有解碼金鑰
04:12
that second matrix.
118
252128
1808
那第二個矩陣
04:13
There's even a branch of mathematics
119
253936
1436
更有一個數學領域
04:15
that uses matrices constantly,
120
255372
1858
無時無刻使用矩陣
04:17
called Linear Algebra.
121
257230
1646
叫做線性代數
04:18
If you ever get a chance to study Linear Algebra,
122
258876
2254
如果你有機會學習線性代數的話
04:21
do it, it's pretty awesome.
123
261130
1836
抓緊機會,它超酷的
04:22
But just remember,
124
262966
1386
只要記得
04:24
once you know how to use matrices,
125
264352
2087
你一旦學會如何使用矩陣
04:26
you can do pretty much anything.
126
266439
2454
什麼也難不倒你
關於本網站

本網站將向您介紹對學習英語有用的 YouTube 視頻。 您將看到來自世界各地的一流教師教授的英語課程。 雙擊每個視頻頁面上顯示的英文字幕,從那裡播放視頻。 字幕與視頻播放同步滾動。 如果您有任何意見或要求,請使用此聯繫表與我們聯繫。

https://forms.gle/WvT1wiN1qDtmnspy7