basic similarity matrix