p1_mrg_vector2

352 days ago by calcpage123

a=vector([1,0,5]);a #initialize a vector in R^3 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(1,0,5\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(1,0,5\right)
b=vector([-2,1,0]);b #initialize a vector in R^3 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(-2,1,0\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(-2,1,0\right)
c=a.cross_product(b);c #vector product 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(-5,-10,1\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(-5,-10,1\right)
d=b.cross_product(a);d #vector product 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(5,10,-1\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(5,10,-1\right)
l=a.plot(rgbcolor='red') m=b.plot(rgbcolor='blue') n=c.plot(rgbcolor='green') o=d.plot(rgbcolor='orange') l+m+n+o 
       
#magnitude of axb is the area of the parallelogram defined a and b area=c.norm();show(area) area.n(digits=20) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}3 \, \sqrt{14}
\newcommand{\Bold}[1]{\mathbf{#1}}11.224972160321824157
\newcommand{\Bold}[1]{\mathbf{#1}}3 \, \sqrt{14}
\newcommand{\Bold}[1]{\mathbf{#1}}11.224972160321824157
#angle between a and b a la torque in radians theta=asin(area/norm(a)/norm(b));show(theta) theta.n(digits=20) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\arcsin\left(\frac{3}{130} \, \sqrt{5} \sqrt{14} \sqrt{26}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}1.3944724879791448774
\newcommand{\Bold}[1]{\mathbf{#1}}\arcsin\left(\frac{3}{130} \, \sqrt{5} \sqrt{14} \sqrt{26}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}1.3944724879791448774
#angle between a and b a la torque in degrees theta2=theta*180/pi;show(theta2) theta2.n(20) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{180 \, \arcsin\left(\frac{3}{130} \, \sqrt{5} \sqrt{14} \sqrt{26}\right)}{\pi}
\newcommand{\Bold}[1]{\mathbf{#1}}79.898
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{180 \, \arcsin\left(\frac{3}{130} \, \sqrt{5} \sqrt{14} \sqrt{26}\right)}{\pi}
\newcommand{\Bold}[1]{\mathbf{#1}}79.898
e=vector([1,1,1]);e #initialize a vector R^3 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(1,1,1\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(1,1,1\right)
#volume of a parallelopiped vol=e.dot_product(c);abs(vol) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}14
\newcommand{\Bold}[1]{\mathbf{#1}}14
#dilation f=2*a;f 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(2,0,10\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(2,0,10\right)
#dilation g=-3*b;g 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(6,-3,0\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(6,-3,0\right)
g.plot(rgbcolor='red')+b.plot(rgbcolor='blue') 
       
l=a.plot(rgbcolor='red') k=b.plot(rgbcolor='blue') m=e.plot(rgbcolor='green') l+k+m