finding the norm of similarity