> I want to make queries on this matrix like (what are the rows most similar to row #2)
There are libraries for efficient vector similarity search like https://github.com/facebookresearch/faiss
There are libraries for efficient vector similarity search like https://github.com/facebookresearch/faiss