How this calculation works
Evaluate the matrix sign function and its complementary stable and unstable invariant-subspace projectors.
X_(k+1)=(mu X_k+(mu X_k)^(-1))/2; S^2=I; P_minus=(I-S)/2; P_plus=(I+S)/2.A worked example
For A=[[-2,1],[0,3]], sign(A)=[[-1,0.4],[0,1]]. Its stable projector is [[1,-0.2],[0,0]] and its unstable projector is [[0,0.2],[0,1]].
Good to know
Real square matrix order≤5 with spectrum separated from the imaginary axis. Scaled Newton sign iteration, commutation/involution and projector checks; report S and P±. No entrywise sign, complex unit phase or classification of near-axis unresolved eigenvalues.
Reference: Primary method or official documentation (opens in a new tab) ↗
A matrix function that separates half-planes
For a scalar with nonzero real part, the complex sign is positive one in the open right half-plane and negative one in the open left half-plane. The matrix sign applies that spectral distinction to a square matrix. It preserves the invariant subspaces associated with those two regions, making it useful for separating stable and unstable continuous-time modes.
The word sign does not mean replacing each entry by positive one, zero or negative one. Off-diagonal entries of the matrix sign can be arbitrary real values, and they encode how the invariant subspaces sit in the original coordinates. An entrywise sign table would generally fail the projector identities and answer a different question.
Compare this with the Matrix resolvent and spectral projector calculator. Split left/right half-plane invariant subspaces through sign(A), rather than evaluate a resolvent at a chosen point or construct a contour projector around selected eigenvalues.
The imaginary-axis restriction
Enter a small real square matrix whose eigenvalues are separated from the imaginary axis. A zero eigenvalue, or a purely imaginary conjugate pair, lies on the discontinuity of the defining scalar function. The requested matrix sign is not defined there. A near-axis spectrum can also make the numerical problem sensitive, even when an exact mathematical sign exists.
The implementation must reject unresolved axis separation rather than infer it solely from a small iteration change. Input scaling matters: an eigenvalue that looks small in absolute units may be well separated relative to the matrix norm. Residuals and conditioning checks should therefore be interpreted using the displayed scale, not by comparing every problem to one fixed absolute threshold.
Newton iteration and its checks
Newton's matrix iteration averages a current matrix with its inverse, optionally introducing a positive scale to balance their norms. Starting from the supplied matrix, the process converges to its sign when the spectral conditions and numerical arithmetic are suitable. Scaling the starting matrix by a positive scalar does not change which half-plane contains each eigenvalue.
An inverse or linear solve that becomes singular or badly conditioned is a reason to stop. After convergence, the computed matrix S should square to the identity and commute with the original matrix. These are useful independent identities, but neither should be used alone as an all-purpose proof that an arbitrary matrix returned by a failed iteration is the correct spectral sign.
Stable and unstable projectors
The stable projector is one half of identity minus S, and the unstable projector is one half of identity plus S. They sum to identity, multiply to zero and each squares to itself. Their ranges are the corresponding left-half-plane and right-half-plane invariant subspaces of the continuous-time system generated by the original matrix.
These projectors need not be symmetric. Oblique projectors are natural when a nonnormal matrix has nonorthogonal invariant subspaces. A negative off-diagonal entry in a projector is therefore not automatically an error, nor are its diagonal entries probabilities. The appropriate checks are idempotence, complementarity, commutation and the conditioning of the spectral split.
A triangular worked example
The default matrix has first row (-2,1) and second row (0,3). Its eigenvalues are already visible on the diagonal, one in each half-plane. The sign has first row (-1,0.4) and second row (0,1). The off-diagonal value comes from the divided difference of the scalar sign across the two eigenvalues.
The stable projector is [[1,-0.2],[0,0]], while the unstable projector is [[0,0.2],[0,1]]. Squaring either reproduces it, and adding them gives identity. This example exposes why an entrywise sign would be wrong: replacing the original off-diagonal one by one would not produce the required sign or its checked complementary projectors.
Ranks and spectral interpretation
The projector ranks count stable and unstable dimensions, including algebraic multiplicity under the supported spectral split. In floating arithmetic, a trace close to an integer can help summarize that count, but the projector residual still matters. Rounding an inconsistent trace does not repair a matrix that fails its defining identities.
Negating the input swaps the two half-planes, so the sign should negate and the stable and unstable projectors should exchange. A similarity transformation should transform the sign by the same similarity, provided conditioning allows an accurate calculation. These structural tests are especially valuable for non-diagonal examples because they test behavior beyond matching a list of scalar eigenvalue signs.
Using the split responsibly
For a continuous-time linear equation x prime equals A x, the stable subspace contains modes with negative real parts. That interpretation differs from discrete-time stability, which asks whether eigenvalues lie inside the unit circle. A matrix sign split should not be presented as a discrete-time stability verdict without a separate appropriate transformation or criterion.
The result also does not measure transient amplification, robustness to perturbations or control-system performance. A nonnormal system can exhibit substantial transient growth even when every eigenvalue is stable. This page supplies the stated spectral separation and numerical diagnostics, with unresolved status whenever the branch or arithmetic checks cannot support a reliable answer.
A few questions, answered
Is this the sign of each matrix entry?
No. It is a spectral matrix function and can have nontrivial off-diagonal entries.
Why are imaginary-axis eigenvalues rejected?
The scalar function is undefined there, so the corresponding matrix sign does not have the required separated-half-plane definition.
Must the projectors be symmetric?
No. Invariant-subspace projectors of a nonnormal matrix may be oblique.
Does a stable rank equal to the matrix order prove no transient growth?
No. The eigenvalue split does not bound transient amplification of a nonnormal system.