Questions on the linear algebra functionality of Mathematica.
0
votes
1answer
54 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
62 views
1
vote
0answers
74 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 ...
0
votes
0answers
5 views
Finding Vectors in cartesian form [migrated]
I am stuck on this question could you please help me.
Find,in Cartesian form, the equations of the straight line through the point with position vector (-1,2,-3) parallel to the direction given by ...
2
votes
2answers
156 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 ...
6
votes
0answers
103 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
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 ...
2
votes
2answers
124 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$), ...
2
votes
1answer
103 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
244 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
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
136 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
118 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
644 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
334 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
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
303 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 ...
1
vote
0answers
95 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
255 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
85 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
105 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
178 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
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 ...
2
votes
0answers
77 views
Evaluating a function on permutations of its arguments
Say I have a function "temp" of $n+1$ variables, $y,z1,z2,z3,...,zn$. I want to test if my function has certain symmetries like swapping $y$ with square of any $z$, swapping any two of the zs, ...
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
...
3
votes
2answers
450 views
Linear equation with complex numbers
I have to solve an equation of the type $$a z+b \overline{z}=c$$ with $a,b,c\in\mathbb{C}$.
My approach is to set $F(z)=a z+b \overline{z}-c$ transform $z$ to $x+i y$ and then get a real linear ...
1
vote
1answer
123 views
Functions that operate on symbolic matrices?
I'd like to write functions that operate on symbolic matrices, and do nothing when fed anything else.
...
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):
...
1
vote
0answers
133 views
Parallel linear algebra with arbitrary precision
Is it possible to do parallel linear algebra with arbitrary precision within Mathematica (in a simple manner, as is done for the machine precision)?
2
votes
1answer
199 views


