What is the difference between Dot & Cross Products, and let's do it in Matlab
A free video tutorial from Hossein Tootoonchy
Invest in yourself, Join 35000 students in the community.
4.3 instructor rating • 4 courses • 31,209 students
Learn more from the full courseBecome a Good Matlab Programmer in 30 days
This is the last time, you wish you could be a Matlab Programmer
13:39:38 of on-demand video • Updated March 2019
- Matlab Programming
- Working with M-Files, Simulation Files, Functions and Scripts
- You are fully able to solve any engineering and technical project offered at University or College
English [Auto] Hi everyone. Welcome back. In this part I'm going to start a new part in vector calculation and it is multiplication a different sort of multiplication and vectors. Well there are two types types of multiplication and vector and matrices. One is called dot product and the other one is a cross-product. So we got started with these two. First let me write down the A again and B at here. I do have two vectors which has the same length. This is important the same let. OK. Now I want to calculate their portrait product and by product we realized that if I do A B It just gives me an error because we cannot apply two vectors or with the same dimension the way that we can do to kind of find their product which is going to be this one multiply by this plus this item multiply by this and continue like that is a function called dots. There is actually a function dot dot and it will ask us to pass two values. So one is going to be Victor A. And the other B. So what it does it just calculates Wiktor A and B together and sum their calculation to see what their result. When I do that it gives me one single number. Always keep in mind that the result of that paradox is going to be one single number. I can get the same result this way. So if I say a multiply B transpose or AB transpose. So if I hit Enter it's going to give me the same result. But how does it calculate it. So if I say A which is this then B transpose this. Now if we can if we just multiply these together we get the same result a multiply B transpose it will give us the same result as a dot and B. And it is really important. OK so let me clear the screen. Now I'm going to explain about the cross-product. And as you know cross and dot product which is also known as a skill to protect our fundamental calculations and operations and engineering. And no matter what your field of engineering is you will need this in your projects. Homework's or research. OK so now we're going to talk about the cross-burning act cross-product and dot products are very important and crucial calculations in engineering filth and no matter what your major is you will need them at some point in your home work in your project. In your research and the concept is also important here. We're not dealing with the mathematics but I'm going to show you how to use Matlab to just ease your way and get the results faster. So I'm going to create a vector called a 1 2 3 and B equals 5 6 and 7. OK. What does. Oh I forgot to sign again. OK. What it does is that the first item that represents the X. The second item represents the Y and the third item represents the Z. And now what we can do is to type cross and it will just give us give us a hint a. And the second item is. So what we've got to do is multiply the crossborder I use a crossword to do a vector and B Wiktor. And if I do that you will see that new vector is going to be created. So if I say name it's C C equals the cross-product that there is now a new vector is created. And what what is the cross-product at that. It is like when when you have a vector and B Victor C one is going to be created in such a way it's perpendicular to both of these. And if you just test that by yourself you will notice that all is correct. So this one is important. When it comes to finding a vector which is perpendicular to both there are a lot of applications for this. One of the most famous one is in a probability an estimation theory where you want to find the victims which are perpendicular to directors to reduce the estimation error to minimize it as a mean estimation error please create some examples for yourself and just try to familiarize yourself with the concepts with the engineering with the mathematics mathematics behind it. So you feel comfortable when it comes to using them in real programs.