A = [1,2,3,4,5,6] A = 1 2 3 4 5 6 B = [1;2;3;4] B = 1 2 3 4 dot(A,A) ans = 91 dot(B,B) ans = 30 A*A' ans = 91 B'*B ans = 30 A = linspace(1,6,6) A = 1 2 3 4 5 6 B = (1./(A'*A))^2 B = 1.0000 0.2500 0.1111 0.0625 0.0400 0.0278 0.2500 0.0625 0.0278 0.0156 0.0100 0.0069 0.1111 0.0278 0.0123 0.0069 0.0044 0.0031 0.0625 0.0156 0.0069 0.0039 0.0025 0.0017 0.0400 0.0100 0.0044 0.0025 0.0016 0.0011 0.0278 0.0069 0.0031 0.0017 0.0011 0.0008