Can someone explain this Linear Programming example’s explanation

linear programming

Can anyone explain part c) to me from this explanation?
I don't understand how the author gets:

$x=\frac1b$ when $a>b$

and

$x=\frac1a$ when $b>a$

Intuitively I don't see how x can be used in both of those equations.
I tried drawing it but I don't see the connection.
This is my attempt at drawing it out

In my opinion there are infinite solutions on the line since there is only one constraint and there are no other constraints that intersect this constraint. Even when $a>b$ or $b>a$ since you still have the same number of constraints from the linear program.

Update

I just realized now why this didn't click with me as I wasn't properly understanding the linear program. My assumption was $x$ AND $y$ need to be maximized meaning whatever point on the line is a solution.

I was not thinking:

$result = x + y$

Maximize the $result$

Where an isosceles region has many solutions because all points on the line have the same $result$. And a scalene region has only one unique solution since it is the max $result$.

More work

Best Answer

I give you a numerical example where $a<b$. I present a graphical explanation as you tried.

$\texttt{max}\ z=x+y$

$2x+3y\leq 5$

$x,y\geq 0$

Now it can be solved graphically.

We solve the constraint for y: $y=\frac53-\frac23x$. You can draw that line.

We can solve the objective function as well.

$y=z-x$ Now you set z equal to 0.

$y=-x$

The line go through the origin with the slope $-1$. You need one more point to draw the line, for instance $P_2(-1,1)$. Now you have the objective function as a line with the initial level 0. This is the red line.

Then you push the left most blue line right upwards parallel until the line touches the feasible region (green) the $ \texttt{last time}$. The blue lines illustrates the process of moving the line upward. You see that it touches a corner. The optimal solution is $(x^*,y^*)=(2.5,0)$ lies on the x-axis.

enter image description here

Another case is if $a=b=2$. Then the solved equations are $y=\frac52-x$ and $y=-x$. Both have the same slope of $-1$. The graphical method can be seen in the next picture. At the end the objective function lies on the constraint. The optimal solutions are $(x^*,y^*)=\left(x,\frac{5}2-x\right) \ \forall \ 0\leq x\leq 2.5$.

enter image description here