The following applet shows
1. The inner product(which is a scale) is defined as \vec{A}\cdot\vec{B}=|\vec{A}|\,|\vec{B}|\cos\theta ,
  So projection of vector \vec{A} into another direction \vec{B} can be calculated as \vec{C}=(\vec{A}\cdot \hat{B}) \hat{B}=(\vec{A}\cdot\frac{\vec{B}}{|\vec{B}|})\frac{\vec{B}}{|\vec{B}|}

2. The cross product \vec{D}=\vec{A}\times\vec{B}, |\vec{D}|=|\vec{A}|\, |\vec{B}| \sin\theta where \theta is the angle between \vec{A} and \vec{B}

/htdocs/ntnujava/ejsuser/2/users/ntnu/fkh/innerproduct_pkg/innerproduct.propertiesFull screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
Download EJS jar file(869.2kB):double click downloaded file to run it. (23 times by 11 users) , Download EJS source View EJS source