In the gram matrix description in the assignment (and also in the lecture), given vectors (v1, … vn), Gij= dot(vi, vj), and it represents the similarity of these two vectors. However, that doesn’t look correct to me.
For example, if v1= [1, 1, 0, 0, 0, 0]^T, v2= [1, 1, 1, 1, 1, 1]^T, and v3=[0, 1, 0, 0, 0, 0]^T. v1 and v2 are mostly different, but dot(v1, v2)=2; while v1 and v3 only differ in on entry, dot(v1, v3)=1, which is smaller than dot(v1, v2).
Usually similarity of 2 vectors can be measured by dot(vi, vj)/(norm(vi), norm(vj)). Is there an assumption that all the vectors are normalized as unit-length? But from the testcase for testing the gram matrix, the input A doesn’t seem to be unit-length in each column?