Consider the 20 points of a 4×5 grid. You randomly choose two points from the 20 points. What is the probability that the two points belong to a horizontal or vertical line?
Assuming we can't choose the same 2 points:
We have 3 points in the same column, or 4 points in the same row, that are valid points to choose, that would result in the dots making a row or column.
Out of the 19 other points you can choose after the first one, there are 7 that match the initial condition.
Therefore, the probability is 7/19.
Sorry I don't have a better explanation, but I'm not really a fan of using latex to make graphics.
... You know what, I'll do it anyways
Here's an example. X is the point we choose, C are the dots that make a vertical line, and R are the ones that make a horizontal line.
\(\begin{bmatrix}X & R & R & R & R \\ C &&&&\\ C &&&&\\ C &&&&\end{bmatrix}\)