omit duplicate in matrix by storing only in one half