How to get eigenvalues of a singular matrix with a variable?

I have a 16*16 symmetric,singular matrix, that has a variable, x, in some of it's elements. The theory is to find values of x that make the matrix determinant equal to zero. But, as I said, the matrix is singular and det(A) is always zero in matlab. I also tried eig(A), but it gives me answers that, in addition to being very long and undisplayable, are equations that still contain the variable! While I only want numberic answers in the output.
If this help, it is a FEM problem for finding natural frequencies by the stiffness and mass matrices.
regards.

1 Comment

If you say that the matrix determinant is always zero, you already found the x-values that make the determinant zero: every x-values will do. Or do I misunderstand something ?

Sign in to comment.

Answers (1)

If a matrix is symbolically singular, MATLAB might simplify the determinants to zero regardless of whether the variable "x" changes that dependency as shown in the code below:
syms x
A = [1, 2; 2, 4 + x - x];
det(A)
Solving a symbolic determinant is very complicated for large matrices (of the order of 10x10) as the size of the determinant's expansion scales by . This might prompt MATLAB to simply return a 0 or a huge unevaluated symbolic expression that can't be solved.
To solve this issue, you need to break down your problem into a generalized eigenvalue problem of the form where your goal is to solve and the eigenvalues are .
After breaking down your matrix into the above form, you can use the "eig" function on the matrices K and M to solve for the eigenvalues numerically as now you are entirely avoiding the symbolic explosion caused by scaling.

Categories

Products

Asked:

on 18 Jun 2022

Answered:

on 11 Jun 2025

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!