课程: R for Data Science: Lunch Break Lessons

免费学习该课程!

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

Matrix: Crossproduct

Matrix: Crossproduct

- [Instructor] So now we can talk about cross product and transpose cross product. And this is not to be confused with the dot product which is done with percent asterisk percent. Let's take a look at how to use cross product. First we'll need two matrices. Here's matrix A and matrix B. And we can take a quick look at those to see what they look like. Here's A and here's B. Produce the cross product of those two matrices we use cross product, P-R-O-D, A comma B, which produces the cross product. And this is equivalent to transposing the A matrix then using the dot product with B. And you can see that the results are the same. So what we learned and here is that the cross product is actually a convenience function for the original equation. And you might be asking when do you use cross product versus the original transpose A dot product B? The answer is, is that one may be faster than other, based on a matrix being…

内容