4 votes
Accepted

Commutant of set of matrices

Take a random matrix: n = 3; M = RandomInteger[{-10, 10}, {n, n}] (* {{9, 1, 8}, {-7, 8, -3}, {7, 10, -7}} *) Build a matrix of unknowns: ...
Roman's user avatar
  • 44.9k
2 votes
Accepted

Generalized scalar product for matrices

The elementwise difference of 2 matrices x,y can simply be written as: x-y. The elementwise square of a matrix x is simply x^2 To add all elements of a matrix, you may use "Flatten" and &...
Daniel Huber's user avatar
  • 45.4k
2 votes

Solving the system of equation with the expression of total differentiation using Cramer's rule

In Mathematica you cannot use superscript input, they are interpreted as powers. Pi is reserved as the numerical symbol of $\pi$, differentials are ...
Roland F's user avatar
  • 2,144
2 votes
Accepted

How to explore the unchanged eigenvalue with the largest real part?

We can look up clusters of eigenvalues at different number of collocation points as follows ...
Alex Trounev's user avatar
  • 41.1k
2 votes
Accepted

How to delete duplicate lists of vectors (in any order) from a list of lists?

You could just use Union: Union[Sort /@ v] You could also use DeleteDuplicatesBy: ...
lericr's user avatar
  • 22.2k
2 votes
Accepted

How to define linear mappings on a vector space spanned by abstract symbols?

Linearity is defined as f[x_+y_]= f[x]+f[y] and f[lam x_] = lam f[x], where lam is a scalar. ...
Daniel Huber's user avatar
  • 45.4k
2 votes
Accepted

How to find and delete the duplicates from lists of vectors

Since V 13.1 there is DeleteElements ...
eldo's user avatar
  • 39.8k
1 vote

How to delete duplicate lists of vectors (in any order) from a list of lists?

Another way to do this using GatherByand Union: ...
E. Chan-López's user avatar
1 vote

Simplify to vectors and matrices

One has to proceed cautiously because Mathematica accepts non-standard algebraic input with vectors and matrices, e.g a.b instead of a.Transpose[{b]] such that dimensions fit for the contraction ...
Roland F's user avatar
  • 2,144
1 vote
Accepted

Gauss elimination with pivoting error

If I make the following smallest possible change to your code: ...
Bill's user avatar
  • 11.5k
1 vote

Nullspace if denominator is zero

First of all, why do you just don't use Inverse[mat]? Like so: ...
Rainer Glüge's user avatar
1 vote

Transition to a new basis with rotation of one of the axes

You may write the given base in an orthonormal base like: base = {{4, 0}, 2 {-Sin[30 Degree], Cos[30 Degree]}}; Then the vertices are: ...
Daniel Huber's user avatar
  • 45.4k
1 vote

Generalized scalar product for matrices

Another method perhaps closer to the textbook could be: (Excuse the code formatting, it is deliberate) ...
Syed's user avatar
  • 37.5k
1 vote
Accepted

What is mathematica command for finding eigenvalues of a generalized eigenvalue problem?

There are several typos in the code with matrix U,W definition. After cleaning, the code looks like this ...
Alex Trounev's user avatar
  • 41.1k

Only top scored, non community-wiki answers of a minimum length are eligible