Eigenvalues and eigenvectors of a square matrix that need not be
symmetric, so eigenvalues and eigenvectors may be complex – TDA's
mev. t_mat.c's dispatch comment understates this
command's arity (mev(A,ER,EI,EV), four arguments); what
m_mev actually parses is five (mev(A,ER,EI,EVR,EVI)),
splitting the eigenvector matrix into separate real and imaginary
parts, as eigen1's header lists them. Column
i of the result, EVR[, i] + 1i * EVI[, i], is the
right eigenvector for eigenvalue ER[i] + 1i * EI[i], i.e.
A %*% v == lambda * v – the same convention and ordering
as base R's eigen(A), confirmed on two matrices, one
with real eigenvalues and one with an asymmetric complex
pair (not simply plus/minus of each other, which the first,
simpler test matrix happened to have and which turned out to mask
a construction mistake in an earlier verification attempt –
recorded here because it is exactly the kind of false confirmation
a too-simple or too-symmetric test case can produce, the same
lesson tda_mevs needed).
Usage
tda_mev(A, dir = tempfile("tda"))Value
A list: values, a complex vector of eigenvalues;
vectors, a complex matrix whose columns are the
corresponding right eigenvectors.
Details
TDA's mev(A, ER, EI, EVR, EVI) requires all four
output operands (none are optional); the wrapper supplies
them and folds the real and imaginary parts into complex
$values and $vectors.
See also
Other matrix algebra:
tda_mcel(),
tda_mcent(),
tda_mch(),
tda_mcross(),
tda_mdiag(),
tda_mevs(),
tda_midf(),
tda_midf1(),
tda_midf2(),
tda_midf3(),
tda_minvs(),
tda_mkmet(),
tda_mkp(),
tda_mmul(),
tda_mnc(),
tda_mnrow(),
tda_mpbl(),
tda_mpfit(),
tda_mpinv(),
tda_mpit(),
tda_mple(),
tda_mpz(),
tda_mscal1(),
tda_msqrtd(),
tda_msvd(),
tda_mwvec()
Examples
tda_mev(matrix(c(0, -1, 1, 0), 2, 2)) # eigenvalues +-i
#> $values
#> [1] 0+1i 0-1i
#>
#> $vectors
#> [,1] [,2]
#> [1,] 7.395571e-32-1i 7.395571e-32+1i
#> [2,] 1.000000e+00+0i 1.000000e+00+0i
#>
#> $er
#> [1] 0 0
#>
#> $ei
#> [1] 1 -1
#>
#> $evr
#> [,1] [,2]
#> [1,] 7.395571e-32 7.395571e-32
#> [2,] 1.000000e+00 1.000000e+00
#>
#> $evi
#> [,1] [,2]
#> [1,] -1 1
#> [2,] 0 0
#>