课程: R for Data Science: Lunch Break Lessons

免费学习该课程!

今天就开通帐号,24,100 门业界名师课程任您挑!

Matrix math review

Matrix math review

- [Instructor] Let's take a quick look at what those look like. There's our A matrix and there's our B matrix. Now let's start off at the very beginning with addition, very, very simple. A plus B, and we receive the sum of each individual element of A and B. So if I look at the first element of A, which is one, row one, column one. And I look at the first element of B, which is in row one, column one which is equal to 11. One plus 11 is the sum of 12. Of course, row one, column two of A is four and row one, column two of B is 14. 14 plus four is 18. And that's what appears in row one, column two of the sum. So addition is fairly straightforward. Let's bring A and B back out here for review while we talk about subtraction. A minus B gives us negative 10. If you step through each element in A and B, you'll find the math equals negative 10 in each instance. Now, if we invert that to B minus A, you get what you…

内容