How can I find $\det(A)/\det(B)$, when individual determinants blow up

143 Views Asked by At

I am interested in the quantity: $\frac{\det(A)}{\det(B)}$ of positive definite matrices $A$ and $B$.

The problem I am running into now is that for large $A$,$B$, (around $200 \times 200$), the determinants of $A$ and $B$ are above the machine precision (I'm using R to find the determinants) and I run into errors with Infinity.

I want to utilize the formula, for $A$, $B$ that are $n \times n$:

$$\frac{\det(A)}{\det(B)} = \frac{\frac{1}{k^n}\det(A)}{\frac{1}{k^n}\det(B)} = \frac{\det(\frac{1}{k}A)}{\det(\frac{1}{k}B)}$$

However, I tried a whole bunch of $k$, $k(n)$ but I still run into $\infty$ (either $\infty$ or $\frac{1}{\infty}$) problems.

The range for the elements in $A$ and $B$ is around $[-1000,1000]$.

Any input or insight would be appreciated!!!

1

There are 1 best solutions below

1
On BEST ANSWER

The determinant is multiplicative, so $\det(A)/\det(B)=\det(B^{−1}A)$. You could try computing $\det(B^{−1}A)$ directly, instead, as it will likely be smaller than $\det(A)$ and $\det(B)$.

Also note that the best way to compute $B^{−1}A$ is probably as the matrix with columns $d_i$ such that $Bd_i=a_i$, where $a_i$ is the $i$-th column of $A$.