SPECIAL PRODUCT
vector is a unit having both scalar and magnitude while scalar only have magnitude.
let say we have 2 vector a=i+2j+3k and b=4i+5j+6k
Using:
1. dot (vector dot vector=scalar)
y= a.b
=( (1x4)+(2x5)+(3x6) )
= 32
matlab command: y=dot(a,b)
2. cross(vector cross vector=vector)
z=axb
=(a12b13-a13b12)i - (a11b13-a13b11)j + (a11b12-a12b11)k
=[ (2x6)-(5x3)]i - [(1x6)-(3x4)]j + [(1x5)-(2x4)]k
=-3i + 6j -3k
matlab command: z=cross(a,b)
MULTIPLICATION
2x+9y=5 and 3x-4y=7 can be written as A=[2,9;3,-4] and B=[5;7]
Can be express in form of Ax=B
where A=[2,9;3,-4] B=[5;7] x=[x;y]
Theoretically x=A-1B
where inverse A, A-1=(1/|determinant A|) x (matrix A but swap position of a11 with a22 and put negative to both)
determinant A=|A|=(a11 x a22)-(a12 x a21)
determinant A=|A|=(a11 x a22)-(a12 x a21)
Using matlab, can use either:
i. x=A\B %(backslash)
ii. x=inv(A)*B % x=A-1B
ans: x=2.3714, y=0.0286