GATE 2025 EE – Question 3
The relationship between two variables $x$ and $y$ is given by $x+py+q=0$ and is shown in the figure. Find the values of $p$ and $q$.
Note: The figure shown is representative.

Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (A) $p=-\dfrac12;\ q=2$
Explanation
The line passes through $(-2,0)$ and $(0,4)$, so $y=2x+4$. Rewriting $x+py+q=0$ as $y=-\dfrac1px-\dfrac qp$: $-\dfrac1p=2$ gives $p=-\dfrac12$, and $-\dfrac qp=4$ gives $q=-4p=2$.