# Lapack routines for solving A x = 0 [duplicate]

This question already has an answer here:

I am looking for a LAPACK routine that allows to find a non-trivial solution to the following equation:

A x = 0

provided that A is a n×n square singular non-symmetric band matrix.

In reality A matrix may not be exactly singular as it is based on some parameter and I use a root finding algorithm to find this parameter (requiring det(A) = 0, where the determinant is found with DGBTRF and multiplication of the diagonal elements).

The only solution I have came up so far is to consider A a dense matrix matrix, use DGEEV to find its eigenvalues and eigenvectors and take the eigenvector for the eigenvalue closest to zero. However, I believe this is strongly sub-optimal approach. Can anyone suggest a better one?

## marked as duplicate by Christian Clason, BrunoLevy, Community♦Nov 14 '15 at 18:14

• Could you actually link to the answer, not just the question (every answer has a share link, use that)? As it stands, I can't tell which one you refer to. – Christian Clason Nov 13 '15 at 16:26
I'm not sure this would be much more efficient, but you can try to solve $Ax=v$ where $\|v\|<\varepsilon$. If the result $\|x\|$ is also $\|x\|<\epsilon$ the matrix may not be singular.