Each square n*n region of an image yields a vector of length n^2 such that the components of the vector are the grey levels of the pixels in the square. Let u, v be the vectors obtained from two image patches, let a be the average of the entries in u, let b be the average of the entries in V and let e be the vector of length n^2 such that each entry of e is equal to 1. Show that
(u-a e).(v-b v)=u.v - (n^2 a b)
NOTE: The textbook is "Image Based Information Processing"
This is a problem regarding vectors and images.