What is the condition for $\angle A$ being acute and obtuse when equation of the three line of the side is given? If equation of the triangle $ABC$'s sides are
$$AB \equiv a_1x+b_1y+c_1=0 \\ 
AC \equiv a_2x+b_2y+c_2=0 \\
BC \equiv px+qy+r=0$$
Then what is the condition for the $\angle A$ being obtuse and acute respectively?
This problem is from coordinate geometry. I hope you guys will help me solve it. Thanks to whoever attempts to answer it.

ATTEMPT
Consider the quantity $[(a_1)(q)-(b_1)(p) ] \times [(p)(b_2)-(q)(a_2)] \times (aa_1+bb_1)$. If this expression is greater than zero, then the angle $A$ is obtuse. If it is less than zero then the angle $A$ is acute. I found this in my textbook.
So, I tried to prove this formula, but I didn't know how to approach it. There is an another formula in my book, where in order to find out  if a triangle's internal angle is obtuse or acute, you need to know the coordinate of $3$ vertices of the triangle. I proved that using vectors.
So, to solve this particular question that I asked,I found out the intersection point of the 3 sides of this triangle in order to get the vertices. But when I plugged in, it was too big an equation to go through. So, I used Wolfram Mathematica to expand it, but it was too big after all and nowhere close to the given answer in my textbook. My mind tells me, maybe it should be done using determinants. But how?
 A: So the idea of the proof of that question, is the following fact :

If $\angle P,\angle Q , \angle R$ are the angles of a triangle, then it is an acute angled triangle if $\cos P\cos Q \cos R > 0$. Alternately, it is an obtuse angled triangle if $\cos P \cos Q \cos R < 0$.

What is the proof? First remember, that the cosine of a (non-reflex i.e. less than $180$ degrees) angle is positive exactly when the angle is acute, and is negative exactly when the angle is obtuse. For example, $\cos 60 > 0$ but $\cos 138 < 0$.
Now, every triangle always contains two acute angled triangles. So , in the product of the  cosines, two of the cosines are always positive i.e. $>0$. So all that matters is the third cosine.
In an acute angled triangle, all three angles are acute. So all the cosines are positive, and their product is positive.
In an obtuse angled triangle, one of the angles is obtuse. So the product is negative.
Which is exactly what we need to prove.

Now, the question is : how can I get the cosines? The answer is simple : vectors!
$\newcommand{\u}{\vec{u}}$
$\newcommand{\v}{\vec{v}}$
So if I have two vectors $\vec{u},\vec{v}$ then the angle between $u$ and $v$, call it $\theta$ is given by $\cos \theta = \frac{\u \cdot \v}{\|u\| \times \|v\|}$. So, to find the angle between two lines, all I need to know is, what vector a line represents, and then take the dot product. But I also know that $\|u\| \times \|v\|$ is always positive. So I just need the sign of $\u \cdot \v$ to see if the whole expression is positive or negative.
Let's say I have a line, like $ax+by + c = 0$. What vector goes "along" this line? There are actually two unit vectors, and they are opposite each other in sign (obviously, there are two ways to go , you can either go up or go down a line). But can we at least find that vector? Let's take an example : take $x+y = 0$. Then for every unit of $x$ that we move up, we move down $y$ by one unit to remain on the line. In other words, the slope is $-1$ so the direction vector is $\hat{i}-\hat{j}$ (every time I go up $\hat{i}$ by $1$, I come down one in $\hat{j}$) , converted to a unit vector (which is actually not required for us to do.)
Now, what we are going to do, is because we are talking about the vectors in a certain order, we have to take the lines in a certain order.
It is quite easy to see the general situation : if $ax+by +c  =0$, then the direction vector is found like this : if I increase $x$ by $1$, then I need to decrease $y$ by exactly the slope of that line, to remain on the line (that is exactly what the slope means). If we write $ax+by+c = 0$ as $y = \frac{-b}{a} x - \frac ca$, then we see that the vector in the direction of $ax+by+c = 0$ is $\hat{i} - \frac{b}{a}\hat{j}$.
Now, we can actually do the job very easily. For example, what is $\cos A$? It is the angle between $AB$ and $AC$. $AB$ is given by $a_1x+b_1y+c_1=0$ so the vector is $\vec{AB} = \hat{i} - \frac{b_1}{a_1} \hat{j}$. Similarly , the vector for $BC$ is $\hat{i} - \frac{b_2}{a_2}j$. Their dot product is $(1 + \frac{b_1b_2}{a_1a_2})$ (note : this $+$ sign is important).
For the other two, we need to be CAREFUL. Why? Let's take angle $B$. Then the angle between $AB$ and $BC$ is formed at $B$. But the vectors need to move in the right direction : if you are measuring the angle at $B$, either we go from $A$ to $B$ to $C$ or from $C$ to $B$ to $A$. So we must take the negative of one of the direction vectors that we get, so that the correct angle come. Let's take $\mathit{BA}$ (not $AB$) and $BC$. Then for $BA$ we should have $\hat{i} - \frac{b_1}{a_1}\hat{j}$, take the negative and get $-\hat{i} + \frac{b_1}{a_1} \hat{j}$. For the other we still have $BC$, which is $\hat{i} - \frac{q}{p}\hat{j}$. The dot product is $-1 + \frac{b_1q}{a_1p}$, which is equal to $-(1 - \frac{b_1q}{a_1p})$.
Similarly the last one, which is $\cos C$, is equal to $-(1 - \frac{b_2q}{a_2p})$.
So, the product is :
$$
(1 + \frac{b_1q}{a_1p}) \times -(1 - \frac{b_1b_2}{a_1a_2}) \times -(1 - \frac{b_2q}{a_2p})
$$
Once we take the common denominator  and cancel the two minuses out , we get :
$$
\frac{(a_1p + b_1q)(a_1a_2 - b_1b_2)(a_2p-b_2q)}{a_1^2a_2^2p^2}
$$
which has the same sign as $(a_1p + b_1q)(a_1a_2 - b_1b_2)(a_2p-b_2q)$, so find the sign of this and you know if the triangle is obtuse or acute, although you don't know which particular angle was obtuse or acute.
This will tell you exactly when angle $A$ is obtuse, and matches with your formula ( I believe that $a$ is $a_2$ and $b$ is $b_2$ in the post, I forgot to correct them during edits).

Now, what if you know the three vertices of the triangle? Call them as $A = (a_1,b_1),B = (a_2,b_2)$ and $C = (a_3,b_3)$.
Here's what we can use here :

Let $a,b,c$ be the measure of three sides of a triangle, and let $A$ be the angle which is opposite side $a$. Then , $A$ is obtuse if and only if $a^2 > b^2+c^2$, and $A$ is acute if and only if $a^2 < b^2+c^2$.

So what we need is to find the distance $AB, AC$ and $BC$, which are easily found from the distance formulas. So $BC$ is the side opposite angle $A$. Just check if $BC^2 > AB^2+AC^2$ or not. If yes, then $A$ is obtuse. Otherwise, it is acute.
In terms of formulas, this becomes :
$$
(a_3 - a_2)^2 + (b_3 - b_2)^2 - (a_3-a_1)^2 - (b_3 - b_1)^2- (a_2 - a_1)^2 - (b_2 - b_1)^2
$$
if this is positive then $A$ is obtuse. If it is negative then $A$ is acute.
So I'm not actually sure where determinants come in here. I struggled for some time, and then realized that this method was easier!
I hope this addresses you queries, though you can feel free to ask further queries if you wish.
