eigenvectors method
Computes the eigenvectors of the matrix using the QR algorithm.
This implementation assumes that the matrix is symmetric and may not converge for non-symmetric matrices.
maxIterations
: Maximum number of iterations for the QR algorithm (default: 1000).tolerance
: Tolerance for checking the convergence of the QR algorithm (default: 1e-10).
Returns a list of eigenvectors, each represented as a column matrix.
Example:
var matrix = Matrix([
[1, 2, 3],
[2, 1, 2],
[3, 2, 1]
]);
var eigenvectors = matrix.eigenvectors();
print(eigenvectors[0]); // Matrix([[0.5773502691896258], [0.5773502691896257], [0.5773502691896257]])
Implementation
List<Matrix> eigenvectors(
{int maxIterations = 1000, double tolerance = 1e-10}) {
return eigen(maxIterations: maxIterations, tolerance: tolerance).vectors;
}