I have an input array of line segments $(a,b)_1 ... (a,b)_n$. Let's call it $S$ so $(a,b)_{S_1} ... (a,b)_{S_n}$.
I have another array of the same construct, let's call it $I$, so $a,b)_{I_1} ... (a,b)_{I_n}$.
I wish to mathematically express the shortest distance of each of $I$ against $S$. In other words, the matrix formed from the product of $I\ S$. To be very clear, each $I$ is compared to each $S$. I want the minimum.
I know $\|(a,b)_{I_k}-(a,b)_{S_k}\|$ denotes distance. How do I represent the matrix formed and indicate the Min of the cells?