For det A = 0, you simply need to add a sufficiently small multiple of diag{1, 1, ..., 1} to get a positive determinant, and diag{-1, 1, 1, ..., 1} to get a negative determinant.
i would like to know something deep, like perhaps the zero locus of det separates matrix space into two components and is the boundary of both, sort of like in the jordan curve theorem.
Hrm. Sounds true. I claim that there is a path connecting any nonsingular matrix A to either the identity = diag{1, 1, ..., 1}, or the matrix diag{-1, 1, ..., 1}, along which the determinant is never zero.
Step 1: there exists a path between any nonsingular matrix A and a diagonal matrix with the same determinant.
The proof is through gaussian elimination -- using only steps of the form "Add a multiple of row m to row n", form a diagonal matrix D.
Each step "Add k times row m to row n" can be turned into an arc via the 1-parameter family "Add tk times row m to row n" (0 <= t <= 1).
Note that the determinant remains constant along this path.
Step 2: reduction to a matrix of 1's and -1's
Now, we have a nonsingular diagonal matrix D. Let B be the diagonal matrix formed by replacing each positive entry of D with 1, and each negative entry of D with -1.
Then, we can form a path connecting D and B as:
(1-t) D + t B
This does not change the sign of the determinant, because the sign of each entry remains the same.
Step 3: reduction to a diagonal matrix with at most one -1.
Suppose the matrix B has more than one -1 in it. In the corresponding plane, form a path by applying a rotation through t radians (0 <= t <= pi). This changes the -1's into +1's, and since the determinant of a rotation is 1, this again leaves the sign unchanged.
To restate: for any matrix A, there is a path connecting A to either the identity, or diag{-1, 1, 1, ..., 1}, and the determimant is never zero along the path.
Therefore, the set of nonsingular matrices has two connected components -- the matrices with positive determinant, and the matrices with negative determinant. The boundary between them is, of course, the singular matrices.
I hope I interpreted the question right, or else all that work for nothing!
