(单词翻译:单击)
By now, I'm sure you know that in just about anything you do in life, you need numbers.
目前为止,我确定你知道你在生活中做的所有事都需要数字。
In particular, though, some fields don't just need a few numbers, they need lots of them.
尤其是有些领域不只需要一些数字,他们需要很多数字。
How do you keep track of all those numbers?
你是如何记录这些数字的呢?
Well, mathematicians dating back as early as ancient China came up with a way to represent arrays of many numbers at once.
早在古代中国,数学家就想出了用数组的方法来一次性表示很多数字。
Nowadays we call such an array a "matrix," and many of them hanging out together, "matrices".
如今,我们称这样的数组是“matrix”(矩阵),其中许多数组一起叫做“matrices”。
Matrices are everywhere. They are all around us, even now in this very room.
矩阵无处不在。它们就在我们的身边,甚至在这个很小的房间里。
Sorry, let's get back on track. Matrices really are everywhere, though.
抱歉,还是让我们回到主题上来。矩阵真的是无处不在。
They are used in business, economics, cryptography, physics, electronics, and computer graphics.
但它们主要运用在商业、经济学、密码学、物理、电子以及计算机图形中。
One reason matrices are so cool is that we can pack so much information into them
矩阵很棒的其中一个原因就是,我们可以把很多的信息放进去,
and then turn a huge series of different problems into one single problem.
然后将一系列不同的问题变成一个单独的问题。
So, to use matrices, we need to learn how they work.
因此,为了可以使用矩阵,我们需要知道它们的工作原理。
It turns out, you can treat matrices just like regular numbers.
事实证明,你可以把矩阵就像普通的数字一样看待。
You can add them, subtract them, even multiply them.
你可以将它们相加、相减、甚至是相乘。
You can't divide them, but that's a rabbit hole of its own. Adding matrices is pretty simple.
你不能将它们相除,但是那可以通过其他方法实现。矩阵相加是很简单的。
All you have to do is add the corresponding entries in the order they come.
你需要做的就是将相应的项按照他们的顺序相加。
So the first entries get added together, the second entries, the third, all the way down.
所以,第一项对应相加,然后是第二项,然后是第三项,以此类推。
Of course, your matrices have to be the same size, but that's pretty intuitive anyway.
当然,你的矩阵必须具有相同的尺寸,但这只是非常直观而已。
You can also multiply the whole matrix by a number, called a scalar.
你也可以用整个矩阵和一个数字相乘,这个数字称为标量。
Just multiply every entry by that number. But wait, there's more!
只需要把矩阵里的每一项都乘以那个数字。等下,还有更精彩的!
You can actually multiply one matrix by another matrix.
事实上你可以令一个矩阵和另一个矩阵相乘。
It's not like adding them, though, where you do it entry by entry.
然而,这个和它们一项一项相加是不一样的。
It's more unique and pretty cool once you get the hang of it. Here's how it works.
它更加特别一点,一旦你得到了它的窍门,那就太酷了。下面就是它怎么运算的。
Let's say you have two matrices. Let's make them both two by two, meaning two rows by two columns.
比方说,你有两个矩阵。我们把它们两个两个分,也就是说有两行两列。
Write the first matrix to the left and the second matrix goes next to it
把第一个矩阵写在左边,第二个矩阵写在第一个矩阵右边,
and translated up a bit, kind of like we are making a table.
然后向上移一点,有点像我们制作一个表格。
The product we get when we multiply the matrices together will go right between them.
我们得到的两个矩阵相乘的结果会在两个矩阵的中间位置。
We'll also draw some gridlines to help us along.
我们还需要画一些网格线来帮助我们。
Now, look at the first row of the first matrix and the first column of the second matrix.
现在,来看第一个矩阵的第一行和第二个矩阵的第一列。
See how there's two numbers in each?
看到行和列的那两个数字了么?
Multiply the first number in the row by the first number in the column: 1 times 2 is 2.
用第一行的第一个数字乘以第一列的第一个数字:1乘以2是2。
Now do the next ones: 3 times 3 is 9.
现在做剩下的,3乘以3是9。
Now add them up: 2 plus 9 is 11.
现在,将这两个数字相加:2加9等于11。
Let's put that number in the top-left position
现在我们把那个数字方在矩阵的左上方,
so that it matches up with the rows and columns we used to get it. See how that works?
这样它就和我们习惯的矩阵的行和列相匹配。看到它是如何运算的了么?
You can do the same thing to get the other entries.
你可以对其他的每一项做同样的事。
-4 plus 0 is -4. 4 plus -3 is 1. -8 plus 0 is -8. So, here's your answer.
负4加上0等于负4。4加上负3等于1。负8加上0等于负8。所以这是你的答案。
Not all that bad, is it? There's one catch, though.
并没有那么糟糕吧?不过这里有一个陷阱。
Just like with addition, your matrices have to be the right size. Look at these two matrices.
就和加法一样,你的矩阵必须有相同的大小。看看这两个矩阵。
2 times 8 is 16. 3 times 4 is 12. 3 times wait a minute, there are no more rows in the second matrix.
2乘以8是16。3乘以4是12。3乘以....等一下。第二个矩阵中少了一行。
We ran out of room. So, these matrices can't be multiplied.
我们没有地方了继续算下去了。所以,这些矩阵不可以相乘。
The number of columns in the first matrix has to be the same as the number of rows in the second matrix.
第一个矩阵的列的数目必须和第二个矩阵的行数相同。
As long as you're careful to match up your dimensions right, though, it's pretty easy.
只需你仔细地匹配矩阵的尺寸,不过呢,这个是非常容易的。
Understanding matrix multiplication is just the beginning, by the way.
顺便说一下,理解矩阵的乘法运算才是刚刚开始。
There's so much you can do with them.
你还可以用矩阵做很多事。
For example, let's say you want to encrypt a secret message. Let's say it's "Math rules".
举个例子来说,假设你想要给一个秘密信息加密。假设是用“数学规则”。
Though, why anybody would want to keep this a secret is beyond me.
虽然我不知道为什么除了我之外的人都想要保守这个秘密。
Letting numbers stand for letters, you can put the numbers in a matrix and then an encryption key in another.
让数字代表字母,你可以把这些数字放在一个矩阵里,然后用另一个矩阵作为加密钥匙。
Multiply them together and you've got a new encoded matrix.
把这两个矩阵相乘,那么你就得到一个新的加密的矩阵。
The only way to decode the new matrix and read the message is to have the key, that second matrix.
解开新矩阵密码来读取消息的唯一途径,是必须有钥匙,也就是第二个矩阵。
There's even a branch of mathematics that uses matrices constantly, called Linear Algebra.
甚至还有一个叫线性代数的数学分支经常使用矩阵。
If you ever get a chance to study Linear Algebra, do it, it's pretty awesome.
如果你有机会学习线性代数,那就去学吧,真的很酷。
But just remember, once you know how to use matrices, you can do pretty much anything.
但是要记住,一旦你知道如何使用矩阵,你几乎可以做任何事情。