Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions about Mathematica functionality related to manipulating vector spaces and linear mappings between such spaces. This includes determination of matrix properties, matrix transformations, decompositions, and factoring.

1
vote
0answers
30 views

Find value of variable for unique, infinite and no solutions in equation system

How do i find which values of a variable in a equations system that gives unique, infinite and no solutions? My example: \begin{align*} ax + y + az &= 2 \\ x + ay + z &= 2 \\ x + ...
2
votes
1answer
68 views

Getting least norm solution

Noob question -- how should I get least norm solution in Mathematica for an under-constrained problem? Matrix is not full rank. I could use pseudo-inverse, but inverting a matrix to get a single ...
0
votes
2answers
37 views

Calculate value of expressions based on solution of given linear equations

I have these three equations: 1/X + 1/Y == 1/15; 1/Y + 1/Z == 1/20; 1/Z + 1/X == 1/25; I want to calculate the value of expression: ...
0
votes
0answers
24 views

Matrix equivalence over the integers

Is there any efficient way to tell whether two matrices $a,b$ are equivalent over the integers? That is, whether there exists some integer-valued matrix $c$ such that $$ a=c^Tbc,\qquad |\det(c)|=1 $$ ...
1
vote
0answers
27 views

How do I maximise the first real root of a multi-variable polynomial in x?

I have a polynomial in x, that also depends on {y1,y2,y3,y4,y5}. It always has 10 (not necessarily distinct) real roots. It's top coefficient is (1*x^10) I aim to find the y's that maximize the ...
2
votes
2answers
48 views

How to return multiplicity of each eigenvalue?

I could not find the information so maybe someone know if it possible. I have a matrix which has several degenerated eigenvalues and I would like Mathematica to return the multiplicity of each ...
2
votes
1answer
76 views

LieArt — 8 dimensional Irreducible representation of $\mathrm{SO}(8)$ and their decompositions - No.2

This is the followed up question of LieArt --- 3 different 8 dimensional Irreducible representation of SO(8) and their decompositions, Since $$ \mathrm{SO}(8) \supset \mathrm{SU}(2) \times \mathrm{...
1
vote
0answers
44 views

LieArt — 3 different 8 dimensional irreducible representation of $\mathrm{SO}(8)$ and their decompositions

I am using the LieArt which you can download freely online https://arxiv.org/pdf/1206.6379.pdf There are three different 8 dimensional $\mathrm{SO}(8)$ irreducible representations, formally it is ...
3
votes
0answers
52 views

Antisymmetric Matrix Eigenvector Normalization

So, I have a complex $4n \times 4n$ antisymmetric matrix, $A$ and it has a non-degenerate spectrum. The matrix $A$ then has eigenvalues given by $$ \beta_{1}, -\beta_{1}, \beta_{2}, -\beta_{2}, ... , ...
0
votes
1answer
65 views

Working with Dirac Gamma Matrices using FeynCalc - A simple problem

I need to obtain this using package FeynCalc: $$ \begin{align} [\gamma_{0},\gamma_{i}]=& 2 \gamma_{0}\gamma_{i}, \\ [\gamma_{i},\gamma_{0}]=& 2 \gamma_{i}\gamma_{0} , \\ [\gamma_{0},\gamma_{...
0
votes
0answers
37 views

Defining commutations rules over arbitrary matrix

I'm working with spin connections with Dirac gamma matrix commutator (I know, mathematica has specific ways to work with it), and I need to define the following rules; $[\gamma_{0},\gamma_{i}]= 2 \...
1
vote
1answer
32 views

How to collect eigenvectors corresponding to only positive eigenvalues?

Let us consider a matrix of order $n \times n$ with $n/2$ positive and $n/2$ negative eigenvalues. How to collect $n/2$ eigenvectors corresponding to positive eigenvalues in a matrix of order $n \...
0
votes
0answers
12 views

Gaussian distribution for delta correlated random variables [migrated]

I read in a paper that "I have a vector $\bf{x}$ such that $\langle x_i (t) x_j > (t')\rangle=\delta_{ij}\delta(t-t')$ and the probability distribution for $\bf{x(t)}$ is a Gaussian ...
5
votes
1answer
80 views

Eigensystem returns vectors which are not eigenvectors

Short synopsis: for a specific family of sparse matrices, the eigensolver seems to be unstable (kernel quitting) for certain examples, and when it works it seems to consistently return vectors which ...
3
votes
0answers
50 views

Arbitrary Precision, Nearly-Singular Matrices, and LinearSolve

I have been trying to solve a nonlinear eigenvalue problem, $\mathbf{M}(\lambda) \mathbf{v} = 0$, in Mathematica using Newton's method. The core of the algorithm relies upon an inverse iteration, ...
5
votes
1answer
70 views

Finding the orthogonal diagonalizing similarity of a symmetric matrix

I'm aware that there are some questions similar to this here, but none that could solve my problem. So, I have to diagonalize a symmetric symbolic matrix $m$ (to be seen below) and obtain the ...
-1
votes
1answer
30 views

column space having non-linear combinations of basis vectors [closed]

I have a matrix $A_{3x3}$ whose basis for the column space are $a_{1}=(2,2,5)$, $a_{2}=(9,5,3)$ and $a_{3}=(3,6,1)$. If these are the basis for the column space, then column space can always be ...
6
votes
1answer
98 views

Inconsistency in eigenvalues of matrices in a specific form (sparse & non-Hermitian)

Suppose one has a non-Hermitian sparse matrix defined as below ...
5
votes
1answer
87 views

Can a certain pair of expressions be compressed into one?

I've been employing this pair of statements ...
1
vote
0answers
44 views

Find parameter which solves a 9-by-9 homogeneous system of linear equations, NSolve gives some incorrect answers

I have a set of 9 linear homogeneous simultaneous equations which depend on 2 parameters, p and x. For a chosen value of p, I aim to calculate the smallest 3 values of x which satisfy the simultaneous ...
0
votes
2answers
53 views

Why do I get a Partition::pdep error?

I've been running an iterative job (j=1,2.,3,.....300,000,000). The vast majority of steps proceed smoothly. Every several million or so steps, I get a "General::inf: Input matrix contains an infinite ...
3
votes
1answer
43 views

Basis for unstable manifold of a matrix

Given a square matrix A, how can I generate a basis for the generalized eigenspace corresponding to all eigenvectors $\lambda_i$ such that $\vert \lambda_i \vert &...
-1
votes
2answers
139 views

Why the NullSpace can not find solution when the Det[t]==0

This question contained the problem of NullSpace, but previous ones not. This is a problem seems like my previous one, but there is some details different. I find that perhaps one method can not ...
1
vote
2answers
156 views

The solutions of Det[t]==0 do not satisfy the equation

t is a generated matrix with a parameter kz. Through solving Det[t]==0, the solutions, i.e. kz, are obtained. When I substitute any one solution in Det[t], the result is a large number, why? How to ...
4
votes
2answers
194 views

LinearSolve on a singular matrix

I have some singular transition rate matrices $m$ (columns add to zero). They have exactly one zero eigenvalue that I want to find the corresponding eigenvector of (the rest of the eigenvalues are ...
1
vote
2answers
76 views
1
vote
1answer
49 views

Increasing accuracy of solving overdetermined linear system

I am given $48 \times 48$ matrix $A$ and a vector $b$ and I would like to solve system $Ax = b$. I know that $A$ is underdetermined, i.e. there exist many solutions for $x$. Due to some considerations,...
1
vote
1answer
49 views

Implementation of discrete Fourier Transform in Matrix Form

I am trying to gain an in depth understanding of how discrete fourier transforms work, and consequently I am trying to implement the discrete fourier transform myself in the form of a matrix. First ...
1
vote
2answers
130 views

Finding point perpendicular to a line

With my special function I was expecting to generate a Point directly perpendicular to the MidPoint of the line chosen by the ...
1
vote
2answers
99 views

How to solve a Linear System with some known values? [closed]

Assuming there's a problem $K\ u=q\ $. $K$ is a (sparse) matrix with elements $K_{i,j}$ - with $i,j$ representing rows/columns and $n_i = n_j$. $u=( u_1,u_2,...,u_n)$ is the solution vector with some ...
6
votes
1answer
83 views

Efficiently fill sparse matrix involving BSpline

Context In order to implement regularised fitting in 2 or 3 dimensions (as is done say here) using BSplineBasis one needs to evaluate a basis over a set of data. ...
1
vote
2answers
75 views

How can I compare two equations in Mathematica?

I want to compare two equations in Mathematica a x + 3 == 1 2 x + b == 1 It should return value a = 2, b = 3. I used this: ...
3
votes
1answer
170 views

Finding optimal rotation matrix

I have vectors E1 = {22.607, 3.495, -30.795}; and R1 = { 4.74061, 21.7549, 30.6501};. This vectors are conneted by a 3D rotation ...
0
votes
0answers
37 views

Finding a solution to a non-square matrix using existing approximate solution

I have a small, non-square matrix, A, with m rows and n columns. The number of columns (n) exceeds the number of rows (m). I also have a vector, b, which I can generate to arbitrary precision. I'm ...
4
votes
1answer
84 views

Reorder matrix for nested dissection

I'm implementing a nested dissection linear solver outside of Mathematica and my original data is actually a graph, from which I have to construct an appropriate adjacency matrix to feed into the ...
1
vote
1answer
43 views

Find parameters of constant eigenvalue in a region of the phase space

I have a 2 $\times$ 2 matrix of the form ...
1
vote
2answers
78 views

How to get the list of vertices of each side of a convex hull 3D figure

From the question "How to get a list of vertices in a convex hull" I can get the list of vertices of each triangle that form each face of the convex hull from a set of {x,y,z} points and also close ...
4
votes
1answer
108 views

Generalized linear algebraic equation solver

$\newcommand{\d}{\vec{d}}$ $\newcommand{\S}{\vec{S}}$ In Mathematica one can easily solve a linear system given by $$A \vec{S} = \vec{d}$$ where $A$ is a matrix, simply by using ...
6
votes
1answer
314 views

CUDA for linear equations

TLDR; Is there a way to solve linear equations of a sparse matrix (discretized laplace operator) efficiently using CUDALink in Mathematica? I didn't find a CUDALinearSolve or CUDAMatrixInverse or ...
1
vote
0answers
30 views

Is there a way to order the QZ(or Gen. Schur) decomposition in mathematica?

Let's imagine I have two matrices $\Gamma_0$ and $\Gamma_1$. The SchurDecomposition function in mathematica will return matrices $Q,\Lambda, Z, \Omega$, such that $...
0
votes
1answer
56 views

about matrix manipulation

I have a large matrix and I want to extract different sub-matrices that actually have elements on different positions. Using Extract and mention the position of ...
1
vote
1answer
77 views

How to solve matrix from an optimization problem in MMA? [closed]

I want to know whether MMA can solve the optimization problem in matrix form. For example, I want to solve the problem $$\begin{align}\min ~ &c^Tx\\ s.t. ~ & Ax=b\\&x\ge 0\end{align}$$ In ...
1
vote
1answer
78 views

For what values of $k$ is matrix invertible

I want to know what value $k$ can not be for the matrix A = {{4, 0, 2}, {-1, 2, 0}, {3, 1 , k}} to have an inverse (be invertible). I now you use the ...
5
votes
1answer
279 views

Solving the Schrodinger Equation by exact diagonalization

I am solving the Schrodinger equation via finite difference, via the substitution where we are assuming $V_1 = V_N = \infty$. I solved this using Mathematica for the case that $V(x) = 0$ and get the ...
0
votes
0answers
49 views

How to write a nonlinear polynomial system in matrix form

I have a nonlinear system like the following example ...
0
votes
1answer
46 views

Convergent matrix

I had a question where they ask me if a matrix is convergent. Matrix is as below: A = {{-1.7, -12.6, -12.6}, {-1.2, -5.6, -6.6}, {1.5, 7.8, 8.8}} I put it in ...
7
votes
4answers
264 views

Find the order $m$ of a matrix ${\bf A}$ such that ${\bf A}^m= {\bf 1}$

I have a square matrix ${\bf A}$ defined over the field $\mathbb Z_2$ and I want to find its order such that ${\bf A}^m=1$. I tried using ...