Diagonalizing quadratic forms in WolframAlpha

Click For Summary
SUMMARY

This discussion focuses on diagonalizing quadratic forms using WolframAlpha (WA) and addresses the challenges encountered when performing matrix operations. The user seeks to find a change-of-basis matrix and an orthogonal matrix for a symmetric matrix \( A \) using WA. It is confirmed that WA can perform singular value decomposition (SVD) but does not recognize the Mathematica function Transpose[]. The user is advised to replace the dot product notation with the asterisk (*) for proper matrix multiplication in WA.

PREREQUISITES
  • Understanding of quadratic forms and their representation as \( f(x) = x^T A x \)
  • Familiarity with matrix operations, including transpose and multiplication
  • Knowledge of the Lagrange method for change-of-basis transformations
  • Experience with WolframAlpha and its syntax for matrix calculations
NEXT STEPS
  • Learn how to perform matrix diagonalization using WolframAlpha
  • Explore the process of singular value decomposition (SVD) in detail
  • Research the properties and applications of orthogonal matrices in linear algebra
  • Investigate alternative online tools for matrix operations and diagonalization
USEFUL FOR

Mathematicians, students studying linear algebra, and anyone interested in computational tools for matrix analysis and diagonalization.

Evgeny.Makarov
Gold Member
MHB
Messages
2,434
Reaction score
4
Hello,

Suppose I have a vector space $V$ over $\Bbb R$, a quadratic form $f(x)$ over $V$, some basis of $V$ and a symmetric matrix $A$ corresponding to $f$ in that basis, i.e., $f(x)=x^TAx$. Using, for example, the Lagrange method, I can find a change-of-basis matrix $C$ ($x=Cx'$) such that in the new basis the matrix $C^TAC$ of $f$ is diagonal with $1$, $-1$ and $0$ on the diagonal. I can also find an orthogonal matrix $C$ such that $C^TAC$ is diagonal (with arbitrary values on the diagonal). Is it possible to find each of these two decompositions in WolframAlpha? Maybe there is some other online service where this can be done?

A related question. Suppose
\[
A=\begin{pmatrix}
0&1/2&1/2\\
1/2&0&1/2\\
1/2&1/2&0
\end{pmatrix}
\]
and using the Lagrange method I found
\[
D=C^{-1}=\begin{pmatrix}
1/2&1/2&1\\
1/2&-1/2&0\\
0&0&1
\end{pmatrix}
\]
I want to check in WA that
\[
D^T\begin{pmatrix}1&0&0\\0&-1&0\\0&0&-1\end{pmatrix}D=A.
\]
I type the following in WA
Code:
Transpose[{{1/2,1/2,1},{1/2,-1/2,0},{0,0,1}}].{{1,0,0},{0,-1,0},{0,0,-1}}.{{1/2,1/2,1},{1/2,-1/2,0},{0,0,1}}
but it is interpreted as though the function Transpose[] is applied to the product of the three matrices: see here! What's up with that?
 
Physics news on Phys.org
I'm not aware of an online tool to do the diagonalizations you ask for.
I do know that W|A will do a singular value decomposition (SVD) for you automatically on any matrix. I think you should be able to deduce your matrices from that.

As for your problem with W|A, I've noticed that it shows indeed some odd behavior when manipulating and multiplying matrices.
However, your immediate problem can be fixed by using * instead of $\cdot$.
 
Click

Yes, it seems WA does not recognize the Mathematica function Transpose[].
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
Replies
9
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 3 ·
Replies
3
Views
1K