Questions on the linear algebra functionality of Mathematica.
0
votes
0answers
23 views
Solving coupled eigenvalue differential equations
I am trying to solve an equation of the form as follows
$\left(\begin{array}{cc}
-\frac{\hbar^{2}}{2m}\frac{\delta^{2}}{\delta z^{2}}+\sin^{2}\left(z\right) & z\\
z & ...
0
votes
1answer
100 views
How to simulate the response of a linear parametric varying system in Mathematica?
Consider the following system
\begin{align}
\dot{x}(t)&=\sum_{i=1}^{2}\rho_{i}(x(t))\left[A_{i}x(t)+B_{i}u(t)\right]\\
y(t)&=Cx(t)
\end{align}
with:
...
1
vote
0answers
51 views
Conditional solution for system of linear equations
I have a linear equation system Q.m = t, with m unkown and where Q has dimensions ...
4
votes
2answers
130 views
Simplifying the trace of a matrix expression
I have a long expression involving matrices that I derived using the NCAlgebra package. Can I simplify the trace of the expression?
For example, say b is a scalar ...
1
vote
1answer
59 views
Hermite Normal Form in “columns” convention
After describing the Hermite Normal Form (HNF), MathWorld explains:
The Hermite normal form for integer matrices is implemented in Mathematica as ...
0
votes
0answers
37 views
Error on loading Orthogonalization package [closed]
I'm trying to implement this on my computer. I typed
Needs["LinearAlgebra`Orthogonalization`"]
I got this as a response:
Needs::cxt: Invalid context ...
0
votes
2answers
98 views
Difference In Eigenvectors
When running my program in both Mathematica and MathCad, I end up with the same eigenvalues, but different eigenvectors. The ones in MathCad are normalized, which the documentation for Mathematica ...
0
votes
0answers
12 views
1+1+1+1+1+1+1+1+1+1+1+1 x 0+1 = 12 or 1? [migrated]
Does the expression 1+1+1+1+1+1+1+1+1+1+1+1 x 0+1 equal 1 or 12 ?
I thought it would be 12 ...
0
votes
0answers
46 views
how to solve a linear system (Ax=b) using domain decomposition?
The Domain decomposition is a natural technique for reducing the computational cost for solving large-scale linear systems, somebody know how to do it using mathematica?
0
votes
0answers
60 views
Is it in general faster to get the eigenvectors and eigenvalues of a dense array rather than a sparse array?
I always thought that things in general go faster when working with sparse array but, I got this:
Eigenvalues::arhm: Because finding 144 out of the 144 ...
0
votes
1answer
91 views
Projection of a set of 4D points to the 3D space
Consider the following set of points in the 4D space:
...
-1
votes
1answer
65 views
1
vote
0answers
77 views
Nontrivial solutions of equation
Here, I have one problem in finding nontrivial solutions of a system of equations. I want to choose one variable, for example X1 and to get solutions of X2(X1) and X3(X1). It is not difficult when I ...
4
votes
4answers
229 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
90 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
45 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
273 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
109 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
67 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
117 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
94 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
111 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 ...
6
votes
0answers
108 views
Calculating the rank of a huge sparse array
By virtue of the suggestion in my previous question, I constructed the sparse matrix whose size is $518400 \times 86400$, mostly filled with $0$ and $\pm 1$. Now I want to calculate its rank.
Since ...
1
vote
2answers
148 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
119 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 ...
2
votes
2answers
154 views
Defining a non-commutative operator algebra in Mathematica
I am trying to develop a function(s) to do some commutator algebra to compute the enveloping algebra and ideals of a Lie algebra. For example if I have $SU(2)$ algebra generated by $L_i$ ($i=1,2,3$), ...
0
votes
0answers
362 views
Jacobi eigenvalue and eigenvectors algorithm
Suppose we have a symmetric matrix with dimensions n x n. I need to find the eigenvalues and eigenvectors of this matrix using the Jacobi method. I wrote this code:
...
2
votes
1answer
115 views
Computing the sign of the real part of eigenvalues in a 3D linearized system with 3 parameters
So I have this dynamical system given by:
$$
\left\{\begin{aligned}
x' &= a(y-\phi(x))\\
y' &= x-y+z\\
z' &= -by
\end{aligned}\right.
$$
where $\phi(x) = \mu x^3 - \nu x$ and $a,b,\mu,\nu$ ...
5
votes
2answers
295 views
Gram Schmidt Process for Polynomials
I want to implement the Gram Schimdt procedure to the vector space of polynomials of degree up to 5, i.e. I want to find an orthogonal basis from the set of vectors $v=(1,x,x^2,x^3,x^4,x^5)$. The ...
3
votes
1answer
237 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
163 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
103 views
0
votes
1answer
65 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
142 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 ...
0
votes
1answer
124 views
Interpolating a Bivariate Polynomial over a Finite Field
Let $F=GF(p)$ be a finite field, $p$ prime and write $F^\times=\{x_1,\ldots,x_n\}$.
I'm trying to implement an earlier version of Sudan's list-decoding algorithm for Reed Solomon Codes
...
5
votes
2answers
765 views
Solving a tridiagonal system of linear equations using the Thomas algorithm
I'm trying to write a function that can solve a tridiagonal system of linear equations using the Thomas algorithm. It basically solves the following equation. (Details can be found at the Wiki page ...
5
votes
1answer
348 views
Octonions in Mathematica
Is there a package or Notebook for Mathematica that can enable me to do some numerical calculations with octonions? Maybe a way to plug-in the octonion multiplication table?
11
votes
1answer
458 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 ...
4
votes
1answer
327 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
210 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
278 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
133 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 ...
1
vote
0answers
103 views
How to express this output in the form $X=A.x$?
This problem arose in my stereo vision project.
I have two matrices:
$$
A = \left(
\begin{array}{ccc}
\text{x1}*\text{p131}-\text{p111} & \text{x1}*\text{p132}-\text{p112} & ...
0
votes
0answers
62 views
Inverse problem of Eigenvalues in DSolve
For my graduation exam I must prepare system of equations to satisfy some specific conditions. I have solutions, output 2, but I need equations eq11 and eq22. So here is an example.
...
0
votes
1answer
269 views
Decoupling system of differential equations
Here I have one task and it is preparation for small exam. I solved it by hand for first case 1), but I need to check it in $Mathematica$ and to try to implement it for both cases 1) and 2) ...
2
votes
3answers
89 views
Selecting terms containing some expression
Imagine I have an expression like
a*k + (a^2)*b*c + b*e
and I would like to obtain the term containing, for example, some power of a. In that case I would ...
7
votes
1answer
119 views
How to create a large sparse block matrix
I need to generate a very large sparse block matrix, with blocks consisting only of ones along the diagonal. I have tried several ways of doing this, but I seem to always run out of memory.
The ...
8
votes
0answers
197 views
More efficient matrix-vector product
Dear mathematica users,
In my present research I am faced with a real dense $n\times n$ matrix $A$ where $n \geq 3000$ (hopefully even more). The coefficients of this matrix are fixed, but I will ...
10
votes
2answers
200 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 ...



