Okay. In this recording we’re going to write a little program on our calculators to calculate the cross product of two three-dimensional vectors. So, the first thing to do is get into the program menu and create a new program.
We’re going to call this program “cross.” It’s already in Alpha mode, so all I have to do is press the keys that correspond to the letters that I want. Okay, so now I’m inside of the program and I’m gonna write the code for it. So the first thing I’m going to do is ask for the user to input the components of the two vectors so the first vector is going to be… The components are going to beso we’re going to prompt for those three letters: A, B and C. The second vector is going to beso we’re going to, again ask for the prompt. So that’s inside of this program menu: the IO is the “input/output.” So, “prompt” for D, E, F. So now I have the components of my two vectors, the next thing we need to do is calculate the components of the cross product. The first component is calculated by doing BF minus CE, so I’m gonna ask it to calculate that And we’re gonna store that into – let’s say X. And we’re gonna calculate the second component: CD minus AF, and we’ll store that into Y. And finally AE minus BD, and we’ll store that into Z. Finally, what we are going to do is get the calculator to display X, Y and Z And I want them to be displayed in fraction format so I don’t end up with bunch of decimals. So I’m gonna go ahead and in first into the program menu, IO, number 3, which is “Display” so we’re gonna display the result of X but we’re gonna ask the calculator to show me X as a fraction Same thing for Y, display as a fraction. And also Z, display as a fraction. So that’s it if you want this to do any further calculations for you for example if you would like to have the magnitude you can just add that to here to display a new line of something else. But I’m just gonna leave it like that. Then “Second”, “Quit” to take this out of here. And just to test it out we’re gonna run the program so we’re gonna go to “Programs”, “Exec” to execute the Cross product, so we hit enter. It’ll ask me for the values of A: (let’s use some decimal numbers) .2, B: negative .3 and C: 2 And then D, E, F, so let’s say .4, negative .2, and 1 And then it tells me what the components of my cross product would be 1/10 for the X component, 3/5 for the Y component, and 2/25 for the Z component. And that’s it! I hope you find this helpful. But I also hope that you don’t forget how to calculate the cross product! Over here you can see the list of key presses if you wanted to follow along. Good luck programming your calculator!