# What is the mathematical explanation for selecting the minimal element in the matrix row

What is the mathematical explanation for selecting the minimal element in the matrix row?

If I have the following matrix

$\left( \begin{array}{ccccc} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 1 & 1 & 1 \\ \end{array} \right)$

I need to select the minimal element in each row.

Then arrange the items as a set or vector

{0,o,1}

What is the mathematical process that was based on them.

My attempts to explain this process mathematically

Assume matrix

$M=\left( \begin{array}{ccccc} V_1 \\ V_2 \\ V_3 \\ \end{array} \right)$

Where $V_1=\{1,0,0\},V_2=\{0,1,0\}$ and $V_3=\{1,1,1\}$

$min(M)=\left( \begin{array}{ccccc} min(V_1) \\ min(V_2) \\ min(V_3) \\ \end{array} \right)=\left( \begin{array}{ccccc} 0 \\ 0 \\ 1 \\ \end{array} \right)$

therefore we get $min(M)$ as state vector :

$$V=min(M)=\{0,0,1\}$$

Is this math operation correct

• AFAIK, this operation has no utility. – Yves Daoust Jul 26 '17 at 16:44
• @YvesDaoust What do you mean by no utility – Emad kareem Jul 26 '17 at 16:58
• Virtually no use. (Except maybe in graph theory, with $0/1$ matrices.) – Yves Daoust Jul 26 '17 at 16:58
• It is unclear to me what is being asked here. Are you asking for example of aplications? asking for an algorithm? or something else. – Siong Thye Goh Jul 26 '17 at 17:01
• @SiongThyeGoh I asking for an algorithm. – Emad kareem Jul 26 '17 at 17:03

Assuming you have a classical computer and given a vector $v$, find its smallest element. To do so just do a linear scan.
Complexity of the approach: $O(mn)$.
• For the first row, $[1, 0, 0]$, initialize a variable$x$ with the first element, $x = 1$. now visit the second element. If it is smaller than it, update it. second element is smaller so update it, now $x=0$. visit the next element, $0$ is not smaller. In the end $x=0$. Repeat for other row. – Siong Thye Goh Jul 26 '17 at 17:21