How do you calculate determinants and eigenvalues in Mathematica?

Click For Summary

Discussion Overview

The discussion revolves around using Mathematica to calculate determinants and eigenvalues of matrices as part of a linear algebra homework assignment. Participants explore methods for handling symbolic variables and finding general formulas for determinants and eigenvalues.

Discussion Character

  • Homework-related
  • Technical explanation
  • Exploratory

Main Points Raised

  • One participant expresses difficulty in calculating determinants and eigenvalues for a general case in Mathematica, particularly for an undefined variable n.
  • Another participant suggests that n must be specified explicitly and that Mathematica cannot derive a general rule without concrete values.
  • A third participant notes that a pattern can be observed when calculating for specific values of n.
  • A later reply acknowledges the assistance received and mentions successfully plotting eigenvalues for n ranging from 1 to 10, identifying patterns in the results.

Areas of Agreement / Disagreement

Participants generally agree that n must be defined explicitly for Mathematica to perform calculations, but the discussion does not resolve how to derive a general formula from specific cases.

Contextual Notes

Participants have not fully resolved the mathematical steps needed to derive a general formula for determinants and eigenvalues, and there may be limitations in their current understanding of Mathematica's capabilities.

Lambda96
Messages
233
Reaction score
77
TL;DR
How to calculate eigenvalues, eigenvectors, determinants and inverses of a general nxn matrix
Hi,

In my linear algebra homework, there is a bonus assignment where we are supposed to use Mathematica to calculate matrices and their determinants etc. here is the assignment.

Bildschirmfoto 2023-05-17 um 15.02.04.png


Unfortunately, I am a complete newbie when it comes to Mathematica, this is the first time I have worked with Mathematica.

I was able to calculate the task a to c. Here is the solution for task b and the Matrix for the case ##n=5##.
Bildschirmfoto 2023-05-17 um 18.58.17.png

I have now problems with the task d, where I should calculate the determinants, eigenvalues, etc for the general case n or rather give a formula.

For the determinant as an example I proceeded as follows and unfortunately I get the following error:

Bildschirmfoto 2023-05-17 um 18.59.47.png

Unfortunately I don't know how to fix the error or is my initial equation already wrong?
 
Physics news on Phys.org
You can't leave n undefined. Mathematica can't find the rule for arbitrary n by itself. You have to calculate the result for explicit values of n, and then find by yourself the general rule.
 
  • Like
Likes   Reactions: Lambda96 and renormalize
As DrClaude says, ##n## must be specified explicitly:
1684346274397.png

The pattern is pretty obvious.
 
  • Like
Likes   Reactions: DrClaude and Lambda96
Thanks DrClaude and renormalize for your help 👍👍

Thanks also renormalize for the trick with plotting n objects in Mathematica, so I could directly plot the eigenvalues from ##n=1## to ##n=10## without repeating the calculation 10 times 👍

I could now recognize corresponding patterns for the other values :smile:
 
  • Like
Likes   Reactions: renormalize and DrClaude

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
9K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K