Tagged Questions
-1
votes
1answer
62 views
2
votes
2answers
155 views
A matrix-vector cross product
I want to do a cross product involving a vector of Pauli matrices $\vec \sigma = \left( {{\sigma _1},{\sigma _2},{\sigma _3}} \right)$; for example, $\vec \sigma \times \left( {1,2,3} \right)$.
...
3
votes
1answer
87 views
Exploiting self-adjointness when changing basis
I am using Mathematica to analyze a real, self-adjoint matrix $H$ of the size $32 \times 32$, which comes from a physics problem. In the picture there is also a matrix $Q$ which commutes with $H$.
I ...
1
vote
1answer
41 views
Partial row reduction of a matrix
I have an $m\times n$ matrix (presumably of full rank) with $m>n$, and I would like to row reduce it, but leave the last column unreduced; that is, I want to get output on the form
$\pmatrix{ 1 ...
5
votes
4answers
259 views
How to find the index of a square matrix in Mathematica quickly?
Let $A$ be an $n\times n$ complex matrix. The smallest nonnegative integer $k$ such that $\mathrm{rank}(A^{k+1})=\mathrm{rank}(A^{k})$, is the index fo $A$ and denoted by $\mathrm{Ind}(A)$. I would ...
0
votes
1answer
89 views
large matrix eigenvalue problem
I need solve a very large complex matrix (not sparse and not symmetry) eigenvalue problem, e.g., 1e4*1e4 or even 1e6*1e6.
How large dimensions of the matrix can Mathematica support? And, how about ...
2
votes
0answers
56 views
Fast calculation of commute distances on large graphs (i.e. fast computation of the pseudo-inverse of a large Laplacian / Kirchhoff matrix)
I have a large, locally connected and undirected graph $G$ with $\approx 10^4$ vertices and $\approx 10^5$ to $\approx 10^6$ edges. Moreover I can bound the maximum vertex degree as $Q_{max}$. I ...
4
votes
3answers
104 views
Compute the rank of a matrix with variable entries
Say I have a matrix like
$$
M=\left(
\begin{array}{c c c}
x & xz & w-2x \\
wz^3 & xy & z \\
y^2-z^3 & x+w & z+x^5
\end{array}
\right)
$$
is it possible to ask Mathematica ...
1
vote
2answers
76 views
Matrix echelon/upper diagonal form
Is there a way to find the echelon form of a matrix in Mathematica? I see there is a function to find the reduced echelon form, RowReduce[], but I can't see ...
1
vote
2answers
99 views
Computing distance matrix for a list
Using functional programming in Mathematica, how can I compute a distance matrix for every element in a list of matrices... The distance would be computed between the item in the list and a "target ...
1
vote
2answers
126 views
Efficient ways to create matrices and solve matrix equations
I am attempting, for the first time, to use Mathematica to do some serious linear algebra. I would like to solve systems of equations of the form $$U_{n n'} f_{n'} = b_n.$$
I have an expression for ...
0
votes
0answers
111 views
6x6 matrix NullSpace
I'm working with a 6x6 matrix. Whenever I try to find the NullSpace and FullSimplify it, I get the error
No more memory ...
3
votes
1answer
226 views
Efficient method for inverting a block tridiagonal matrix
Is there a better method to invert a large block tridiagonal Hermitian block matrix, other than treating it as a ordinary matrix?
For example:
...
7
votes
2answers
156 views
Why does my matrix lose rank?
I want to check the rank of a matrix for observability, but Mathematica loses a rank if the matrix contains very large numbers.
Let's say my matrix is
...
0
votes
1answer
96 views
0
votes
1answer
63 views
Why does Eigenvalues[matrix I defined] not work? [duplicate]
This is the code I have in my mathematica notebook. I want to find the eigenvalues of the matrix I created called Hmatrix as defined below. However when I type Eigenvalues[Hmatrix] I get the Hmatrix ...
3
votes
1answer
134 views
How to get the determinant and inverse of a large sparse symmetric matrix?
For example, the following is a $12\times 12$ symmetric matrix. Det and Inverse take too much time and don't even work on my ...
11
votes
1answer
433 views
Eigenvalues and Determinant of a large matrix
Can anybody kindly explain to me what is going wrong regarding a simple problem I have? I can find the eigenvalues of a large matrix using Eigenvalues[], but when I ...
1
vote
1answer
66 views
Confirming the existence of a function related to a matrix
Is it possible to get an answer to the following question in Mathematica?
Let $M$ be a $n$ by $n$ matrix, is there a function $m:\mathbb{N}\times \mathbb{N}\rightarrow \mathbb{Z}$ such that ...
3
votes
1answer
302 views
TensorContract of inverse matrix
Matrix inverse in mathematica
If $A$ is an invertible $n \times n$ matrix, then $A\cdot A^{-1} = I$.
To get this statement in Mathematica, you need the assumption
...
9
votes
2answers
203 views
Speed up 4D matrix/array generation
I have to fill a 4D array, whose entries are $\mathrm{sinc}\left[j(a-b)^2+j(c-d)^2-\phi\right]$ for a fixed value of $\phi$ (normally -15) and a fixed value of $j$ (normally about 0.00005). The way ...
1
vote
2answers
207 views
badly conditioned matrix (General::luc)
With some matrices I am receiving the following message
Inverse::luc Result for Inverse of badly conditioned matrix (M) may contain significant numerical errors.
How can I tell to Mathematica to ...
2
votes
1answer
129 views
Can I reduce a matrix inequality such as $\mathbf x^\prime\mathbf A\mathbf x > \mathbf x^\prime\mathbf x$?
I'm new to Mathematica. When I do linear algebra, I wonder if I can have an inequality such as $\mathbf x^\prime\mathbf A\mathbf x > \mathbf x^\prime\mathbf x$, where $\mathbf x$ is a column vector ...
10
votes
2answers
183 views
Compiling LinearSolve[] or creating a compilable procedural version of it
Earlier today I had a discussion with a representative at Premier Support about the 2 questions I've asked here over the past couple of days:
Seeking strategies to deploy a function securely ...
3
votes
3answers
233 views
Correct way to populate a DiagonalMatrix?
I would like to create a series of correlation matrices that starts with :
sensMat[[1]] = DiagonalMatrix[ { 1,1,1,1,1 } ]) // MatrixForm
and iterates in 0.1 ...
0
votes
0answers
82 views
Not getting the required eigenvalues [closed]
I'm trying to use Mathematica to show that the eigenvalues of $U$ are $\pm\dfrac{1-i}{\sqrt{2}} $, where
$U = (I + T + iS)(I - T- iS)^{-1}$ where $ S = \left( \begin{matrix}
1 & 1 \\
1 ...
1
vote
1answer
108 views
RowReduce Problem
Here are two examples:
RowReduce[{{3, 1, a}, {2, 1, b}}]
evaluates to
{{1, 0, a - b}, {0, 1, -2 a + 3 b}}
but
...
8
votes
1answer
158 views
Verifying and deriving basic (block) matrix identities
How can I use the new symbolic matrix/tensor capabilities to verify matrix identities, such as
(1)
or
(2)
Even better, how can I ask Mathematica to derive expressions for X, Y, Z, and U like ...
1
vote
0answers
167 views
Matrix algebra vs. PrincipalComponents and Varimax/Oblimin
Using matrix algebra I can calculate loadings and scores from the covariance matrix (data matrix is column centered):
...
2
votes
1answer
199 views
1
vote
1answer
303 views
Calculating an exact orthogonal modal matrix in Mathematica
I can calculate the modal matrix of a matrix A using the command JordanDecomposition[A][[1]], and a decimal approximation of the orthogonal (or normalised) modal ...
5
votes
2answers
798 views
Eigenvalue / Eigenvector Calculation
I'm currently trying to compute the three smallest eigenvectors for a 34 by 34 matrix. While I was expecting this to take some time, Mathematica has been running for the past 3 hours, which seems ...
4
votes
1answer
438 views
Mathematica won't give eigenvectors but Wolfram Alpha will? What am I doing wrong?
If I ask Mathematica to find the eigenvectors and eigenvalues of the matrix:
...
10
votes
2answers
189 views
How can I compute the representation matrices of a point group under given basis functions?
Take the $C_{3v}$ point group for example:
...
2
votes
3answers
408 views
Finding eigenvalues of a $1500\times1500$ matrix
I need to find the eigenvalues of a $1500\times1500$ real symmetric matrix given by $A_{i,i+1}= A_{i+1,i}=-1$ and also $A_{1,N=1500}=-1$ (this is because of a periodic boundary condition used) and all ...
1
vote
1answer
301 views
Is Mathematica matrix multiplication with its inverse wrong? [duplicate]
Possible Duplicate:
Why don't * and ^ work as I expected on matrices?
When I enter this
...
1
vote
2answers
292 views
How to Solve or LinearSolve $A = I$ matrix equation?
I'd like to solve this equation for $A = B$ where $B = I$, which represents 3 systems of 3 linear equations, for $a, b, c, d, e, f$, without writing LinearSolve 3 ...
14
votes
3answers
648 views
Mathematica for linear algebra course?
I'm taking a linear algebra / matrix theory course and we are free to use any software we want, and will be "expected to use MATLAB or an equivalent" for homework. The professor and textbook (Applied ...
3
votes
4answers
121 views
Pack Solve results into a vector
I am currently using a really easy function to get the eigenvectors of a corresponding eigenspace:
...
9
votes
3answers
516 views
Correcting a correlation matrix to be positive semidefinite
Does Mathematica have a way to "fix" a correlation matrix that is not positive semi-definite?
I looked through the documentation and search the internet but could not find anything.
3
votes
2answers
385 views
Can RowReduce work in this matrix?
The matrix $Q$ with dimensions $n\times2*n*m$ is structured by
$$Q=[B|AB|\cdots|A^{2*n-1}B]$$
where $Q$ is an augmented matrix built from a $3\times3$ matrix, $A$, and a $3\times2$ matrix, $B$.
I ...
7
votes
1answer
224 views
Efficiently Constructing Rank One Approximations for a Matrix using SVD
Suppose I have a $m\times n$ matrix $A$ (real for simplicity). Then SingularValueDecomposition[A] yields 3 matrices $U$, $\Sigma$ and $V$ such that
$A = U\Sigma ...
6
votes
1answer
344 views
Finding the characteristic polynomial of a matrix modulus n
Given a square matrix, is it possible to calculate its characteristic polynomial modulo n?
Unfortunately, this function ...
2
votes
2answers
535 views
Matrix multiplication in Block Form symbolic calculation by Mathematica
I have a problem which requires taking product of two $10\times10$ matrices. I would like to do it by considering both matrices as $5\times5$ matrices such that each entry of both matrices is actually ...
12
votes
4answers
308 views
How do you decompose a polynomial matrix into its matrix coefficients?
Let's say I have a matrix, $\mathbf{M}$, that is polynomially dependent on a single variable, such as
M = {{15 + a^2, a + 5 a^2}, {a - 5 a^2, 2}}
and I want to ...
4
votes
1answer
354 views
Computing Slater determinants
I need to compute Slater determinants. I'm wondering if I would benefit from assigning each of my functions to a variable prior to computation. I'm working with Slater determinants, but my question ...
3
votes
2answers
568 views
How to substitute numeric values in a symbolic Jacobian matrix?
I have a multi-variate function from $\mathbb{R}^n\to\mathbb{R}^n$. Choosing any desired initial vector, we can produce the corresponding function value, which is a vector as follows. The main problem ...
9
votes
2answers
215 views
How to extract and compute on the diagonal entities of a sparse matrix very fast?
As could be seen in the following code:
...
4
votes
1answer
256 views
How do I keep the right ordering of eigenvalues using Eigensystem?
I'm having an issue with the Eigensystem command. I need to diagonalize a bunch of 3 by 3 complex valued matrices, but more importantly, I need to keep the exact ...
6
votes
0answers
228 views
Inverse of a large sparse Hermitian block matrix
I am looking for a method (if it exists) for the inverse of a large sparse Hermitian block matrix.
The off diagonal sparse matrices, named δ are 4x4, and they have ...

