Using MATLAB, create three vectors a = 4i, b = 2i - 4j, and c = -2i + 3k, where i, j and k are unit vectors of three axes in Cartesian coordinate system. Compute |?∙(?×?)| using the predefined MATLAB commands and show that it is the volume of a parallelepiped defined by three vectors a, b and c.
We have given 3 vectors a,b,c. The volume of parallelepiped could be found out by computing |?∙(?×?)|
Matlab code for this will be:
a = [4 0 0]
b = [2 -4 0]
c = [-2 0 3]
vol = abs(dot(a,cross(b,c))) // wlll calculate a.(b x c) and will display its magnitude
By runnig these command line by line in matlab command line editor , answer will be 48
We know Volume of a parallelepiped is base * height . Consider a,b as base and c as height
base is the product of two bottom sides
The height of the parallelopiped is orthogonal to the base, so it is the component of c onto a x b which is perpendicular to the base
matlab code
base = norm(cross(a,b)) // This will display magnitude of a x b = 16
height = abs(dot(c,cross(a,b)))/norm(cross(a,b)) // display magnitude of height = 3
base * height // yields 48
Else the volume of parallelopiped is also equal to determinant of matrix formed by 3 vectors
matlab code
z = [a;b;c] // matrix matrix formed by 3 vectors
vol = abs(det(z)) // yields 48
Hope its clear.
Get Answers For Free
Most questions answered within 1 hours.