x = [1,-2,1,3,4];
y = [2,1,-1,-1,1];
x*y'

x=[-1 2 0 3 1 -2];
y=[ 3 2 5 4 -1.5 1];
norm(x,2)*norm(y,2)-abs(x*y')

x = [1,-2,1,3,4];
y = [2,1,-1,-1,1];
norm(x+y,2)^2-norm(x,2)^2-norm(y,2)^2

x=[-1 2 0 3 1 -2];
y=[ 3 2 5 4 -1.5 1];
norm(x+y,1)^2+norm(x-y,1)^2-2*(norm(x,1)^2+norm(y,1)^2)

norm(x+y,2)^2+norm(x-y,2)^2-2*(norm(x,2)^2+norm(y,2)^2)

norm(x+y,inf)^2+norm(x-y,inf)^2-2*(norm(x,inf)^2+norm(y,inf)^2)

A=[1 2 3; 2 4 6; 1 0 -1]

v=null(A), B=orth(A')

[v'*B(:,1),v'*B(:,2)]

e1 = [1 0 0]'; e2 = [0 1 0]'; e3 = [0 0 1]';
A = [0 -1 2; 2 3 4; -3 2 5];
(A*e1)'*(A*e2)

(A*e1)'*(A*e3)

(A*e2)'*(A*e3)

U1 = [cos(pi/4) -sin(pi/4) 0 ; sin(pi/4) cos(pi/4) 0; 0 0 1];
U2 = [cos(pi/3) 0 sin(pi/3); 0 1 0; -sin(pi/3) 0 cos(pi/3)];
U3 = [1 0 0 ; 0 cos(pi/6) -sin(pi/6); 0 sin(pi/6) cos(pi/6)];
U = U3*U2*U1

x = [1;2;-1]; y = [0;1;-3];
(U*x)'*(U*y)-x'*y

u1 = [1/2 1/2 1/2 1/2]';
u2 = [1/2 1/2 -1/2 -1/2]';
u3 = [-1/2 1/2 -1/2 1/2]';
U = [u1 u2 u3];
U'*U
