# How to obtain the orthogonal matrix that diagonalize a symmetric matrix [closed]

I have a real symmetric matrix H which is in symbolic form, I need a matrix P that can diagonalize H; also P is orthogonal and its columns are the eigenvectors of H.

How can I doing this in mathematica? Below is my sample matrix.

 H = {{λ - u, -t, -Δ, 0},
{-t, -λ - u, 0, -Δ},
{-Δ, 0, -λ + u,  t},
{0, -Δ, t, λ + u}} // MatrixForm

-

## closed as off-topic by m_goldberg, Michael E2, ubpdqn, bobthechemist, PickettMar 8 at 21:33

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – m_goldberg, Michael E2, ubpdqn, bobthechemist, Pickett
If this question can be reworded to fit the rules in the help center, please edit the question.

Try searching the documentation. –  b.gatessucks Mar 7 at 12:39
This question is not trival I think. The Eigenvetors only give the eigenvetors of my matrix. However, they do not form a orthogonal matrix P. @SimonWoods –  luming Mar 7 at 13:18
@b.gatessucks How to do this neatly also ensure P is an orthogonal matrix? As the answer below, you can easily check that column 3 and column 4 are not orthogonal(their inner product is not zero). Though you can normalize each row to make any two rows are orthogonal, but how can you ensure any columns are orthogonal at the same time? –  luming Mar 7 at 13:41
@SimonWoods After doing P = Transpose[Eigenvectors[H]] as you suggested, a normalization procedure of each column in P should also be done. After that, P will be an orthogonal matrix with its columns are the eigenvectors of H. Am I right? –  luming Mar 7 at 14:29

H = {{λ - u, -t, -Δ, 0},
{-t, -λ - u, 0, -Δ},
{-Δ, 0, -λ + u,  t},
{0, -Δ, t, λ + u}};
P=Transpose[Eigenvectors[H]] // Simplify;


Now you have to orthogonalize the matrix:

POrt = P.Inverse[Sqrt[Simplify[Transpose[P].P]]];

-
Please look my question details. @bcp >Require "P is orthogonal" –  luming Mar 7 at 13:12
I corrected the answer... –  bcp Mar 7 at 13:50
Thanks, this should work in principle. –  luming Mar 7 at 14:15
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7104012370109558, "perplexity": 2962.402089786428}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-41/segments/1410657138501.67/warc/CC-MAIN-20140914011218-00011-ip-10-234-18-248.ec2.internal.warc.gz"}