I am studying pell conics and the source I am using (Franz Lemmermeyer: Conics - A Poor Man's Elliptic Curves) defines its discriminant as follows:


For equations of the form $X^2 + XY + \frac{1-d}{4}Y^2$ = 1, the discriminant is $d$, ($d\equiv 1$ mod $4$.)


For equations of the form $X^2 - dY^2 = 1$, the discriminant is $4d$, (with d$\equiv$ $2$ or $3$ mod $4$.)


The question is how does one find those values to be the discriminant, or more generally, how is the discriminant defined and how is it calculated when dealing with more than one variable, for example with the homogenized version of an equation, $X^2 + XY + \frac{1-d}{4}\*Y^2 - Z^2$? 


One thing I've tried is to take a matrix, $A$, with $v = [X,Y,Z]$, where our equation is equal to $v^tAv$, and the discriminant appears to be related to the determinant of $A$. Any clarification would be wonderful. 



Definition of a Discriminant in Three Variables
Given $n$ homogeneous polynomials $F\_i(x\_1,\ldots,x\_n)$ in $n$ variables with respective degrees $d\_i$, there is a unique polynomial ${\rm Res}(F\_1,\ldots,F\_n)$ in the coefficients of the $F\_i$ called the multidimensional resultant which satifies:


1. It is irreducible.
2. It is equal to 1 when $F\_i=x\_i^{d\_i}$.
3. It vanishes iff there is a solution $(x\_1,\ldots,x\_n)\neq (0,\ldots,0)$ to the system of equations $F\_i(x\_1,\ldots,x\_n)=0$, $1\le i\le n$.


Then for a single homogeneous polynomial $F$ the discriminant is the resultant of the $n$ partial derivatives $\frac{\partial F}{\partial x\_i}$.


For nonhomogeneous equations, you just need to homogenize. If the $d\_i=1$ then the resultant is just the determinant of the corresponding linear forms. Finally the conic case where $F$ is homogeneous of degree 2, the discriminant is indeed the determinant of the corresponding quadratic form in three variables.


Some canonical references on resultants:


1. The book "Discriminants, Resultants, and Multidimensional Determinants"
by Gelfand, Kapranov and Zelevinsky.
2. The article by Jouoanolou ["Le formalisme du résultant"](https://www.sciencedirect.com/science/article/pii/0001870891900312).
3. The book by Faa di Bruno ["Théorie Générale de l'Élimination"](https://books.google.com/books?id=QflACY8TFnQC&printsec=frontcover#v=onepage&q&f=false).


