%arithmatics of vectors

v1=[1 2 3]
v1'
v1=1:1:3 % another simple method to generate vectors with structural pattern

v2=[4 5 6]
v2'

v3=v1+v2
v4=v1-v2
%v1*v2 <- this generates error, to calculate the dot product, we use
v5=v1*v2'

%arithmetics of matrices

a=[1 2 3 ; 4 5 6 ; 7 8 9]; % note the ";" in the end of the statement
a'
b=[10 11 12; 13 14 15; 16 17 18];

c=a+b
d=a-b
e=a*b
det(a)
det(b)
f=a^-1% both matrix a and b are singular!!
g=b^-1

%some useful commands for vectors and matrix

size(a)
length(a)
