Balancing by Diagonal Similarity: Preserve the Eigenvalue Task
2026-11-21

Balancing by Diagonal Similarity: Preserve the Eigenvalue Task

Balancing by Diagonal Similarity changes a square matrix's coordinate scale while preserving its eigenvalue problem in the corresponding transformed coordinates. SciPy's matrix_balance returns a balanced matrix and a transformation satisfying B equals T inverse times A times T. Applying a reciprocal transformation on one side is essential; independently normalizing rows would describe a different operation.

Choose an exact independent transformation

Let A have rows [1,16] and [1,1]. Choose the diagonal transformation T with diagonal entries four and one. Its inverse has diagonal entries one quarter and one. Both transformations are invertible.

Multiplying A on the right by T scales its first column by four. Multiplying the result on the left by T inverse scales the first row by one quarter. The transformed matrix B has rows [1,4] and [4,1]. This is an exact constructed similarity example, rather than a claim that every LAPACK version must return that particular T.

A1,16/1,1 Tdiag4,1 B1,4/4,1
Chosen T illustrates B=T inverse A T; no claim of identical library output across versions. Zhilianhai editorial desk, original AI-assisted concept diagram.

Row and column scaling work together

The entry sixteen becomes four, while the opposite off-diagonal entry one becomes four. The diagonal entries stay one because the reciprocal row factor and column factor cancel there. Off-diagonal entries change according to the ratio of their column and row scales.

This example becomes symmetric after balancing, but symmetry is not the general objective. The documented method tries to equalize row and column one-norms through the permitted similarity transformations. An arbitrary matrix should not be assumed to become symmetric or to have all row sums equal to one.

By5y y1,1 xTy4,1 Ax20,5=5x
Similarity preserves eigenvalues while changing vector coordinates. Zhilianhai editorial desk, original AI-assisted concept diagram.

The absolute row sums of our A are seventeen and two, while its absolute column sums are two and seventeen. In B all four corresponding sums are five. This exact check shows the intended balancing effect for the constructed example, without asserting that every input permits perfect equality under power-of-two scaling.

Another check distinguishes preserved spectral information from changed entry magnitudes. Both matrices have trace two and determinant minus fifteen. However, summing the squares of their entries gives two hundred fifty-nine for A and thirty-four for B. Thus even a visually dramatic reduction in entry scale does not describe an orthogonal transformation or preservation of every Euclidean matrix measure.

The eigenvalues follow the same characteristic equation

For our independent A, the characteristic determinant is lambda minus one squared, minus sixteen. For B it is the same expression. Both matrices therefore have eigenvalues five and minus three.

The preserved eigenvalues follow from similarity, not from all entries staying numerically unchanged. Other quantities, including individual entry magnitudes and ordinary vector lengths in the changed coordinates, need not remain the same. It would be incorrect to describe balancing as preserving every possible norm or singular value.

Map eigenvectors back through the transformation

If B times y equals lambda times y, then A times T y equals lambda times T y. The corresponding original-coordinate eigenvector is therefore x equals T y. Ignoring this mapping can leave a correctly computed eigenvalue paired with a vector in the wrong coordinates.

In our example, y equal to [1,1] is an eigenvector of B with eigenvalue five. Multiplying by T gives [4,1]. Applying A to [4,1] yields [20,5], which equals five times the original-coordinate vector. This direct integer check makes the coordinate relationship visible.

Permutation and scaling are separate options

The documented interface can first permute the matrix to isolate eligible triangular parts, then scale the remaining subblocks. The permute and scale flags control those parts of the procedure separately. A returned transformation may consequently include a permutation as well as diagonal scaling.

The separate option returns scaling and permutation vectors instead of allocating the complete transformation matrix. Those compact outputs still require their documented interpretation; they are not simply two interchangeable lists of multipliers. This article's exact example uses diagonal scaling only.

Powers of two help represent the scaling

The interface describes scaling factors chosen as powers of two, which are convenient in binary floating arithmetic. Our constructed factor four is one such value. That choice limits additional representation effects from scaling, but does not eliminate every rounding or conditioning issue in a complete eigenvalue computation.

The original implementation validates a square finite array, calls the LAPACK GEBAL family, and reconstructs the requested transformation representation. Balancing can be useful, but it is not a universal certificate that every matrix problem becomes well-conditioned or that every numerical error must decrease.

Retain the coordinate convention with a result

A report should preserve which matrix was balanced and how its returned vectors relate to the original coordinates. The site's similarity transformation principles and numerical matrix features connect those decisions. Primary sources: the balancing equality and options and the original wrapper and transformation reconstruction. Both figures are original AI-assisted exact independent algebra, without performance claims.

18028484626 CONTACT US

公司:智联海(惠州)科技有限公司

地址:惠州仲恺高新区陈江街道白云山工业大道 5 号六楼 601

Q Q:18028484626

Copyright © 2002-2026

咨询 在线留言 电话:18028484626
微信 微信扫码添加我