I would like to ask Python to compute the determinant of a large symmetric matrix where all off diagonal entries are known. The diagonal entries could vary. Since I need to compute the determinant many times with different diagonal entries, it seems a waste of time when the computation involves the multiplications of all those known entries over and over again. Is there a way to pre-compute the determinant so that it is a function of diagonal entries with some prefactors?
2026-03-29 12:05:35.1774785935
How to efficiently compute the determinant of a matrix with unknown diagonal entries?
47 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in LINEAR-ALGEBRA
- An underdetermined system derived for rotated coordinate system
- How to prove the following equality with matrix norm?
- Alternate basis for a subspace of $\mathcal P_3(\mathbb R)$?
- Why the derivative of $T(\gamma(s))$ is $T$ if this composition is not a linear transformation?
- Why is necessary ask $F$ to be infinite in order to obtain: $ f(v)=0$ for all $ f\in V^* \implies v=0 $
- Summation in subsets
- $C=AB-BA$. If $CA=AC$, then $C$ is not invertible.
- Basis of span in $R^4$
- Prove if A is regular skew symmetric, I+A is regular (with obstacles)
- Dimension of solution space of homogeneous differential equation, proof
Related Questions in DETERMINANT
- Form square matrix out of a non square matrix to calculate determinant
- Let $T:V\to W$ on finite dimensional vector spaces, is it possible to use the determinant to determine that $T$ is invertible.
- Optimization over images of column-orthogonal matrices through rotations and reflections
- Effect of adding a zero row and column on the eigenvalues of a matrix
- Geometric intuition behind determinant properties
- Help with proof or counterexample: $A^3=0 \implies I_n+A$ is invertible
- Prove that every matrix $\in\mathbb{R}^{3\times3}$ with determinant equal 6 can be written as $AB$, when $|B|=1$ and $A$ is the given matrix.
- Properties of determinant exponent
- How to determine the characteristic polynomial of the $4\times4$ real matrix of ones?
- The determinant of the sum of a positive definite matrix with a symmetric singular matrix
Related Questions in SYMMETRIC-MATRICES
- $A^2$ is a positive definite matrix.
- Showing that the Jacobi method doesn't converge with $A=\begin{bmatrix}2 & \pm2\sqrt2 & 0 \\ \pm2\sqrt2&8&\pm2\sqrt2 \\ 0&\pm2\sqrt2&2 \end{bmatrix}$
- Is $A-B$ never normal?
- Is a complex symmetric square matrix with zero diagonal diagonalizable?
- Symmetry of the tetrahedron as a subgroup of the cube
- Rotating a matrix to become symmetric
- Diagonalize real symmetric matrix
- How to solve for $L$ in $X = LL^T$?
- Showing a block matrix is SPD
- Proving symmetric matrix has positive eigenvalues
Related Questions in PYTHON
- Solve an equation with binary rotation and xor
- Function to rotate on a 3D sphere at a fixed distance?
- Verify the Riemann Hypothesis for first 1000 zeros.
- confused by the description of numpy.linalg.lstsq
- Rotate around a specific point instead of 0,0,0
- Calculating $\pi$: using a spigot and starting from middle
- Prove by the Principle of Recursion
- Use recursion to prove the bounds of the Fibonacci numbers when $n\geq 2$
- How to perform a double (numerical) integration of $f(x,y)$ over an irregular sample of $x$ and $y$ values
- What does s(n) = s(n) mean?
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
I don't think that this is very efficient but it does determine algebraically what the algebraic form of the answer looks like.
Suppose that your matrix is $A=[a_{ij}]_{i,j=0}^n$, and that $x_i:=a_{ii}$.
Then the determinant is some polynomial $$ \Delta=\sum_{i_1<i_2<\dots<i_k}\alpha_{i_1 i_2 \dots i_k}\ x_{i_1}x_{i_2}\dots x_{i_k} $$ where the sum is running over all the $2^n$ subsets of $\{1,2,\dots,n\}$.
How can we determine the coefficients $\alpha_{i_1 i_2 \dots i_k}$?
Well note first that from the polynomial expansion we have that $$ \alpha_{i_1 i_2 \dots i_k} =\frac{\partial^k\Delta}{\partial x_{i_1}\partial x_{i_2}\dots\partial x_{i_k}}\big|_{x_1=x_2=\dots=x_n=0}. $$
Now we can differentiate $\Delta$ using the shape of $A$. Consider the usual expansion of $\Delta$ by the $j$-th row. Then we see that differentiating with respect to $x_j$ essentially replaces the $j$-row of $\Delta$ by a row which is $0$ everywhere except at the $j$-th column, where it is $1$.
Hence we obtain the coefficient $\alpha_{i_1 i_2 \dots i_k}$ by replacing in $A$ the rows $i_1, i_2, \dots, i_k$ as above, then setting all the $x_i=0$, and computing the determinant. Effectively we are just computing the cofactor got by deleting these rows of $A$ after setting the diagonal entries to $0$.
[There may be hidden conventions here: to avoid doubt, the constant term is $\alpha_{\emptyset}$ and it is just the determinant of $A$ after setting the diagonal terms to $0$; and the coefficient $\alpha_{1 2 \dots n}$ of $x_1 x_2\dots x_n$ is $1$.]