How to organize, add and multiply matrices - Bill Shillito

如何对矩阵进行组织,相加以及相乘 - 比尔 - 希利托

542,930 views

2013-03-04 ・ TED-Ed


New videos

How to organize, add and multiply matrices - Bill Shillito

如何对矩阵进行组织,相加以及相乘 - 比尔 - 希利托

542,930 views ・ 2013-03-04

TED-Ed


请双击下面的英文字幕来播放视频。

00:00
Translator: Andrea McDonough Reviewer: Bedirhan Cinar
0
0
7000
翻译人员: xuanyu shi 校对人员: Erli Cai
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
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
现在,将这两个数字相加:
2加9等于11。
02:41
2 plus 9 is 11.
75
161040
2411
现在我们把那个数字让在矩阵的左上方,
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
假设是用“数学规则”。
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