# How to draw the equation of the form ax + by = 0 please?

The title is self-explanatory . :-)

thanks,

Actually my description is not comprehensive : I want to draw the graphical solution of an operation research problem

maximize $z = 7x_1 + 9x_2$.

• under $x_1 + x_2 \leq 8$.
• $x_2\leq 4$.
• $2x_1 + 3x_2 \leq 19$.
• $x_1\geq 0$.
• $x_2\geq 0$.
-
Not really. Draw where? "By hand" is as valid an answer as the question :-) Without context, this question is liable to be closed as "Not a Real Question". – Aryabhata Feb 9 '11 at 8:13
The question is still unclear. Why don't you take a sheet of paper and mark the axis and units and draw these lines? or do you want a software to do this for you? It is always essential to state the question clearly. Most people (at least the few I know of) are not psychic. – user17762 Feb 9 '11 at 8:32
Sorry for not being clear : I want to draw by hand the equation 7x1 + 9x2 = 0 knowing the information I put above – Bruno Feb 9 '11 at 8:42
Do you want each of the conditions to hold separately (that is, are you trying to maximize $z$ under five different, separate, sets of conditions), or all five conditions to hold at the same time? – Arturo Magidin Feb 9 '11 at 17:21
@Arturo : The five conditions have to hold at the same time. – Bruno Feb 10 '11 at 16:13

Sivaram has answered your title problem: you simply plot the points $(0,0)$, $(b,-a)$ and $(-b,a)$ or any two of them. Then you draw the straight line through these points, extending it if necessary.

Let's extend it in two ways to your optimisation problem. First, how to draw $ax+by=c$ where $c$ is not $0$. Plot the points $(\frac{c}{a},0)$ and $(0,\frac{c}{b})$; this also works if one of $a$ or $b$ is $0$. Then you draw the straight line through these points, extending it if necessary. That, together with Sivaram's advice, is enough to draw your five constraints. This will give you a feasible region which is a simple convex polygon, in this case with five vertices.

The second extension is to draw a line parallel to $ax+by=0$ which passes through the point $(d,e)$. The answer is to plot the points $(d,e)$, $(d+b,e-a)$ and $(d-b,e+a)$ or any two of them. Then you draw the straight line through these points, extending it if necessary. You can do this with your function to be maximised and each of the five points. One or more of the five resulting lines will be further to the top-right than the others. The point(s) in your feasible region this passes though will give where $z$ is maximised.

If after all this you do not find that the maximum possible value of $z$ is $62$ then either you or I have made a mistake.

-
Thanks for your answer ! – Bruno Feb 10 '11 at 16:12

To draw any straight line, all you need is two points. In the case of $ax+by = 0$, the line clearly passes through $(0,0)$. Further, the line passes through couple of other points which are easy to recognize namely $(b,-a)$ and $(-b,a)$. So just mark these points on the sheet and draw it. If $a=0$, then the line is nothing but the $X$ axis while if $b=0$, then the line is nothing but the $Y$ axis.

-
Could you explain what exactly you mean? – user17762 Feb 9 '11 at 8:18