Questions tagged [matrix]
Questions on the manipulation of matrices in Mathematica.
3,644 questions
2
votes
1
answer
50
views
How to find a matrix in a ragged list?
I have been trying to efficiently process data scraped from websites. One issue is that the data I want is often in the form of a matrix embedded at some level in a ragged list. I have developed one ...
4
votes
3
answers
194
views
Finding real variable where a 2×2 complex matrix is singular in Mathematica
I have a 2x2 complex matrix
...
1
vote
0
answers
65
views
Eigenvectors of GSE with right properties
I encountered a weird problem when trying to study a few properties of eigenvectors of matrices sampled from the Gaussian symplectic ensemble (GSE). I have encountered this while trying to understand ...
1
vote
3
answers
429
views
How to change the color of the individual squares on a chessboard?
The code I have written to create a chessboard is as follows:
...
5
votes
3
answers
447
views
How to define a matrix to be positive definite and symmetric?
I'm somewhat new to Mathematica and want to check symbolic solutions to small positive definite symmetric matrices (like 3x3 in size), which I think should in general yield a symbolic solution since ...
0
votes
1
answer
137
views
Is it possible to find eigenvectors of matrix $f(1)$ in the given code analytically in terms of the variable $y$?
I have this differential matrix equation f'[x] == {{2 x, y + 5 I}, {-3 I + 2 y, Sin[3 x] - 5 y}}.f[x] for f[x] with the initial ...
0
votes
1
answer
128
views
How to increase the precision and accuracy for computing eigenvectors of a large matrix NUMERICALLY?
I have a large 40*40-dimensional matrix $H$ and I need to find its eigenvalues and eigenvectors. The elements of the matrix are complicated, mostly in the form of Root[544 ... - 6790 #^39 + #^40& ...
2
votes
2
answers
159
views
Getting the row operation matrices in RowReduce
Mathematica's built-in function RowReduce renders a given matrix into RREF (Row Reduced Echelon Form), but is there any option to see what row operation matrix it ...
4
votes
1
answer
223
views
Clever way of getting blocks from block diagonal or block anti-diagonal matrices?
There is a built-in command BlockDiagonalMatrix that takes in blocks and form a block diagonal matrix. I wonder if there is a convenient way of doing the inverse. ...
4
votes
1
answer
150
views
How to implement a 2x2 operator in Mathematica?
I am trying to write a Mathematica program to compute the following:
For a given Hermitian matrix $\rho$, the operator $L_\theta$ with respect to a parameter $\theta$ is defined as:
\begin{equation}
...
0
votes
1
answer
111
views
Mathematica demonstration: Frozen-corner enumeration of (ASMs) Alternating Sign Matrices [closed]
Besides the Mathematica code provided in arXiv:2509.14006, I made some complement to it.
...
0
votes
1
answer
89
views
DSolve throws overdetermined error for large (but simple) system of ODEs
I have the following example, which is a proxy for the more complex problem I am trying to solve.(Apologies that the LaTeX is explicit, for some reason it trips the code formatting error on ...
5
votes
1
answer
242
views
SemidefiniteOptimization function claiming no solution when a solution does exist
The following code
...
5
votes
3
answers
450
views
Linear system of matrices
I don't know Mathematica very well, I have an equation involving matrices of the following form:
given two $5\times5$ matrices $A,B$ where $B$ is nilpotent we want to find a matrix $X$ such that
...
0
votes
0
answers
144
views
Quantity dependent on choice of Eigenvectors of degenerate eigenvalues
This question uses the function sumFast (defined below as well) given : here.
Let us say we are given a matrix A and I want to ...