Questions tagged [matrix]
Questions on the manipulation of matrices in Mathematica.
3,589
questions
4
votes
0
answers
75
views
Solving a matrix differential equation with change of variable
In order to solve $\partial_t X(t) = -i(M X(t) - X(t) M^*)$ (where * is conjugate-transpose), I wrote the following code:
...
3
votes
1
answer
102
views
Finding Jacobian from Hamiltonian
Suppose I am given a Hamiltonian. How do I find the Jacobian from the Hamilton equations of motion? Here is what I have done so far:
...
4
votes
0
answers
223
views
Why does DiagonalizableMatrixQ give different answers when Simplify or FullSimplify is applied to a 4x4 matrix, consisting of complex trig. functions?
NOTE: I HAVE CLEANED UP THIS DISCUSSION TO MAKE THINGS MORE TRANSPARENT:
I am using Mathematica version 12.1. I have a 4x4 matrix called matrixA[x, y], which ...
3
votes
1
answer
84
views
Determine the rank of a matrix expression
I have posed a question here regarding the determination of the rank of a matrix expression, which has yet to receive a complete answer. Therefore, I want to symbolically define these matrices for a ...
1
vote
0
answers
46
views
Entropy Production Rates
I am trying to reproduce the results shown in Fig. 2(a) of the paper https://journals.aps.org/prresearch/pdf/10.1103/PhysRevResearch.6.033037 to calculate entropy production rates in a cavity ...
2
votes
1
answer
133
views
Can one say that the 14.1 update effectively introduced symbolic operations on infinite matrices?
Since it is possible to operate with symbolic matrices of unspecified dimensions and there are symbolic matrix constructors (SymbolicOnesArray, ...
0
votes
1
answer
72
views
Symbolic matrix formula simplification of identity function
I was doing some math with the new Mathematica symbolic matrices and I was trying to get the result to simplify, FullSimplify does not do anything as well as ...
3
votes
1
answer
48
views
Line-separated MatrixPlot based on magnitude
Given the matrix
...
0
votes
3
answers
106
views
LinearSolve and badly conditioned matrix
I'm trying to use LinearSolve to deal with the linear system m.x==b. For some reason, I get the message error:
Result for LinearSolve of badly conditioned matrix may contain significant numerical ...
2
votes
2
answers
76
views
Best way to extend the size and add terms to a SparseArray without expanding
Let's say I have a "small" SparseArray of any size, in the example $2\times2$
...
8
votes
3
answers
318
views
Abrupt increase of evaluation time of MatrixExp
I test MatrixExp with different matrix sizes. When its dimension is smaller than 1435*1435, the time consumed is not much. But when it goes to 1435, the time increases a lot.
...
0
votes
0
answers
56
views
How do I implement the new VectorSymbol and MatrixSymbol with numeric data?
This post by @xzczd sent me down the rabbit hole trying to use numeric data with the portfolio optimization example in the Documentation for VectorSymbol
Here is the code in the documentation
...
1
vote
1
answer
108
views
Vector and matrix "indices" for physics calculations
I am trying to do a simple quantum mechanical calculation that involves both vector and spinor indices. Abstractly, the calculation of the vector $\vec{v}$ looks like the following:
The right-most ...
0
votes
1
answer
64
views
How to convert a $2 \times 2$ matrix with entries of $4 \times 4$ matrices into a regular $8 \times 8 $ matrix
I have tried to create the following matrix $$\begin{bmatrix} 0_{4} & \mathbb{I}_{4} \\ \mathbb{I}_{4} & 0_{4} \end{bmatrix}.$$
I have used the following code
...
2
votes
1
answer
119
views
Central element of matrix
Let we have $(2\cdot r+1) \times (2\cdot r+1)$ matrix mat.
Is there a better way to extract it's central element,
rather than ...