Vectors
February 2018
Vectors are defined in n dimensions:

x = [5]





h1 = quiver(0,0,5,0, "linewidth", 2.5);
set(h1, "maxheadsize",0.02);
set(h1, "autoscalefactor", true);
xlabel("x");
ylabel("y";
axis([-1 6 -1 1]);


x = [2 3]





h2 = quiver(0,0,2,3, "linewidth", 2.5);
set(h2, "maxheadsize",0.02);
set(h2, "autoscalefactor", true);
xlabel("x");
ylabel("y");
axis([-1 3 -1 4]);


x = [4 3 1]





h3 = quiver3(0,0,0,4,3,1, "linewidth", 2.5);
set(h3, "maxheadsize",0.02);
set(h3, "autoscalefactor", true);
xlabel("x");
ylabel("y");
zlabel("z");
axis([-1 5 -1 4 -1 2]);


And so on, all the way to
x = [x1 x2 x3 ... xn]
.

The Euclidean norm gives an intuitive idea about the length of a vector:

||x|| = sqrt(x1^2 + x2^2 + ... + xn^2)


On the real number line this length is simply
|x|
, which in turn makes operations such as subtraction intuitive. For example:

x - y = z




The operation stays linear in two dimensions:



Where a subtraction operation can be visually understood to mean the following: