I am trying to calculate the dual form of an SVM optimisation problem: Dual Form Optimsation Problem In my algorithm, I have a vector of alphas, vector of target outputs, and a Kernel matrix computing upfront. However, I am stuck as to what indices alpha and j should be taking here. If i and j are equal, then everything is just squared. Is this for i =/= j? If so, could I just duplicate each vector and flip it?