English 中文(简体)
数学矩阵
原标题:Mathematica matrix diagonalization

页: 1

采用数学的方法是:

a={{0, -1}, {-1, 0}}
d = DiagonalMatrix[Eigenvalues[a]]
{{-1,0}, {0,1}}
p = Transpose[Eigenvectors[a]]

p.d.Inverse[p]
{{0, -1}, {-1, 0}}

这是正确的。

问题在于,P矩阵不是我预期的。 数学产生的矩阵

p={{1, -1}, {1, 1}}

但是,我期待着

p2={{1/Sqrt[2], 1/Sqrt[2]}, {1/Sqrt[2], -(1/Sqrt[2])}}
p2.d.Inverse[p2]
{{0,-1}, {-1,0}}

后者也解决了问题。 是否有办法迫使我用数学在应用权时显示不同的答案?

最佳回答

你们需要做的是使你得到的答案正常。 一项职能称为

Normalize /@ {{1, -1}, {1, 1}}

“Mathematicagrams”/

问题回答

您能够使您的主人正常化:

a = {{0, -1}, {-1, 0}};
d = DiagonalMatrix[Eigenvalues[a]];
p = Transpose[Normalize /@ Eigenvectors[a]];

http://www.un.org

{{1/Sqrt[2], -(1/Sqrt[2])}, {1/Sqrt[2], 1/Sqrt[2]}}

Eigenvectors can be freely rescaled by a constant, which means there are an infinite number of possible eigenvectors. Naturally, Mathematica cannot and will not show you all of them. So you ll need to normalize the eigenvectors in some way.

One option is to convert your matrix to numeric form using N. Mathematica returns normalized eigenvectors for numeric matrices.

p2 = Transpose[Eigenvectors[N[a]]]

这是一种风险,因为计算数字矩阵的反面值往往由于各种数字错误而明显失败。

另一个更好的选择是,使用<代码>热化,使异构体手工化。 您必须将其应用于由<> 代码>Eigenvectors 返回的名单上的每一名校长:

p2 = Transpose[Normalize/@Eigenvectors[a]]

也许你们应考虑在矩阵要素化工具中建立起来? 当然,有许多矩阵系数,其中许多是用数学计算的。 可能与你的情况最接近的是<代码>。 约旦Decomposition。 正在采取行动

SeedRandom[1];
a = RandomReal[{-2, 2}, {4, 4}];
{s, j} = JordanDecomposition[a];
Column[MatrixForm /@ {s, j}]

“enter

Chop[s.j.Inverse[s] - a]

“entergraph

当然,许多矩阵无法分辨,但是,如果是的话,约旦的分层将给你希望的东西。 病媒的正常化,其方式与<条码>Eigen的功能一样,但我看不到为什么这是一个问题。





相关问题
Maths in LaTex table of contents

I am trying to add a table of contents for my LaTex document. The issue I am having is that this line: subsubsection{The expectation of (X^2)} Causes an error in the file that contains the ...

Math Overflow -- Handling Large Numbers

I am having a problem handling large numbers. I need to calculate the log of a very large number. The number is the product of a series of numbers. For example: log(2x3x66x435x444) though my actual ...

Radial plotting algorithm

I have to write an algorithm in AS3.0 that plots the location of points radially. I d like to input a radius and an angle at which the point should be placed. Obviously I remember from geometry ...

Subsequent weighted algorithm for comparison

I have two rows of numbers ... 1) 2 2 1 0 0 1 2) 1.5 1 0 .5 1 2 Each column is compared to each other. Lower values are better. For example Column 1, row 2 s value (1.5) is more ...

热门标签