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.

learn more… | top users | synonyms

4
votes
2answers
186 views

How to solve a linear system by LinearSolve when the variables are duplicate?

Given that I have a set of equations about varible $x_0,x_1,\cdots,x_n$, which own the following style: $ \left( \begin{array}{cccccccc} \frac{1}{6} & \frac{2}{3} & \frac{1}{6} & 0 & ...
9
votes
2answers
167 views

Does LinearSolve know that I gave it a Sparse lower triangular matrix?

Let $\mathbf L$ be a nonsingular numeric (non-symbolic) large, lower triangular sparse matrix. Let $\mathbf b$ be an appropriately sized vector. I want to solve $\mathbf L\mathbf x=\mathbf b$. ...
2
votes
3answers
257 views

Eigenvalues of a large matrix

I want to compute the eigenvalues (and later the corresponding eigenvectors) of an $n\times n$ Hermitian matrix. For this I use {evs, vecs} = Eigensystem[matrix] or ...
7
votes
1answer
224 views

How write a new MatrixRank feature with symbolic computation

The current MatrixRank is a slight foolish without any capacity of symbolic computation ,feature of Mathematica, like this: ...
3
votes
2answers
124 views

How to make the determinant formula visible even in cases when det=0

When I compute the determinant analytically in Mathematica, I do it with Det[{{a, b}, {c, d}}] which gives the output ...
6
votes
0answers
74 views

How to instruct MatrixLog to work with singular matrices?

How to instruct MatrixLog to work with singular matrices by ignoring the zero eigenvalues (thus only acting on a subspace orthogonal to the matrix kernel)? I'm ...
0
votes
0answers
94 views

Absurd solution by LinearSolve

I am trying to find curve that passes through all the data points.To do this i am doing interpolation using LinearSolve. No. of equations vary from 1000 to 3000. LinearSolve gives me values of ...
2
votes
1answer
104 views

Is there a good way to check, whether a small value produced numerically is a symbolic zero?

I have a complicated 4x4 matrix and need to know the eigenvalues. I expect a zero eigenvalue for physical reasons. Giving numerical values first gives me an eigenvalue of $\mathcal O(10^{-15})$. Now ...
1
vote
1answer
68 views

Why is KroneckerProduct(vector,vector) a matrix in mathematica, not a vector?

"If A is an m × n matrix and B is a p × q matrix, then the Kronecker product A ⊗ B is the mp × nq block matrix" from Wiki Thus the Kronecker product of two vectors, i.e. $3\times 1$ matrices, ...
7
votes
0answers
125 views

Examples of using Mathematica to solve matrix equations symbolically

Suppose we want to solve a linear system like $$\left\lbrack\begin{array}{cc}M& S\\ -S^\mathrm{T}&0 \end{array} \right\rbrack \left\lbrack \begin{array}{c} x\\y\end{array}\right\rbrack = ...
3
votes
1answer
60 views

Reduce set of symbolic equations to linearly independent subset

Given a set of symbolic equations $f_i(x_1,x_2,...,x_n)=0$ in several variables, for example f1=x+y-z; f2=x-y+z; f3=3x-y+z; I would like to apply a function ...
3
votes
0answers
50 views

Does NDSolve automatically simplify the system of equations for Hermitian matices?

I am currently starting to solve numerically a system of differential equations like this: $\dot{A}(t)=S(A)A(t)$ Here, the matrices are of dimension $d\times d$. $S(A)$ is some superoperator that ...
1
vote
0answers
66 views

“Reduce” works fine for a non-linear system with 9 equations, but cannot solve it if 10 equations. Any ways to improve the code?

I am trying to solve a class of problems, which are basically about a solution to a system of non-linear equations subject to the constraint that some subset of solutions must be non-decreasing. I ...
9
votes
1answer
146 views

Sorting eigenvectors according to its projection

The problem I'm trying to calculate the eigenvalues and eigenvectors of a matrix that depends on a parameter x. As x changes, I ...
1
vote
1answer
84 views

How to plot the field of values of a matrix

For a given matrix A (let's say of dimension 2 to keep it simple), I need to plot in the complex plane its field of values. The field of values of a matrix is defined as the set $\{\langle{Ax, ...
1
vote
0answers
59 views

Rotating an oriented surface in 3D

I have an oriented surface S in three dimensions. Let's say that initially the surface is parallel to the x-y-plane with orientation vector ...
5
votes
1answer
114 views

Evaluating only one column of a $m \times m$ matrix without evaluating the matrix itself

Suppose I have f[x_] := SparseArray[{someRules}, {m, m}]; g[x_] := MatrixPower[f[x], k]; Would it be possible to evaluate only the $n$-th column ($n\neq m$) of ...
2
votes
0answers
71 views

Solve vs. LinearSolve - ill solutions using both methods [closed]

I'm wishing you a nice day. My question is related to this question previously asked by me, answered by PlatoManiac. Although I found a bug in his post I decided to leave his answer accepted and ask ...
4
votes
0answers
107 views

Eigenvalues FEAST method - performance is very variable

I am running the FEAST method option for Eigenvalues on sparse matrices of dimension around 500,000. I look for about 50 ...
3
votes
1answer
111 views

How to reduce an expression into user-defined variables?

In the following code, I define a set of matrices. Then, I define a function that calculates the commutation relation relation between these matrices ...
1
vote
0answers
58 views

Continuous integration of a tensor function using discrete density values

Hei, I am wondering is it possible to implement continuous integration using Integrate() of a fourth order tensor with discrete density values. ...
4
votes
3answers
105 views

Find six vectors with rational entries under constraints?

Define six vectors v[i] with i=1,2,3...,6. Each v[i] is six dimensional and all entries in ...
2
votes
1answer
159 views

Eigenvectors of numerical matrix

I have a large numerical matrix whose eigenvalues are all distinct. In the documentation for Eigenvectors it says: For approximate numerical matrices m, the ...
0
votes
0answers
28 views

LUDecomposition does not give the expected results [duplicate]

Check this example: ...
1
vote
1answer
65 views

Invoking WorkingPrecision slows down Eigenvalue calculation drastically?

Normally, obtaining eigenvalues of random numerical matrices is fast. For instance a generic result looks like ...
2
votes
0answers
130 views

Linear Programming Using Dual Simplex method

I want to solve an optimization problem using the Dual Simplex Method. Although Mathematica gives the result directly when I use the command Minimize but I want to ...
3
votes
0answers
64 views

Explicitly find a guaranteed factorization of large expression?

Consider the large expression LE defined in this file (involving only linearly independent functions), or in this file (linear interdependence present but slightly ...
10
votes
2answers
235 views

Analytic determinant of a sparse 25x25 matrix?

I would like to compute the analytic determinant of the following sparse matrix ...
2
votes
1answer
71 views
12
votes
1answer
208 views

Nearest Kronecker Product

Some people (see The ubiquitous Kronecker product by Van Loan) have worked on finding two matrices $\mathbf A$,$\mathbf B$ of specified size whose tensor product $\mathbf A\otimes\mathbf B$ is closest ...
6
votes
3answers
252 views

How to simplify symbolic expressions with KroneckerProduct

Having $X,Y$ being symbols for matrices, I was wondering if there is a way to simplify expressions like KroneckerProduct[X, X] + KroneckerProduct[-X, X] to ...
2
votes
1answer
189 views

Solve overdetermined set using Mathematica?

As shown below, this is a overdetermined system. Could you teach me how to find the optimized solution in Mathematica? I know it could be solved by the method of least square, but how to realize it in ...
2
votes
2answers
189 views

Solve a symbolic underdetermined Linear System

Dear StackExchange Community, I'm trying to solve an indeterminate linear system of equations, with $n+1$ variables and $n$ equations; therefore, I need to express all $n$ other variables a function ...
1
vote
2answers
132 views

LUDecomposition for non-square matrices

How do we go about finding the LUDecomposition for non-square matrices. When i try to input the standard LUDecomposition ...
1
vote
1answer
98 views

Orthogonalization is not commutative!

I get stuck into a problem: I am going to produce orthogonalized eigenvectors of a matrix and in any iteration. I shortened my question in the bellow line: Why do we face to different results of ...
4
votes
1answer
83 views

Easy way to solve a matrix equation for a matrix?

I have two sets of $10\times 10$ matrices $M1,M2,M3,M4,M5$ and $N1,N2,N3,N4,N5$ and I want to solve a set of equations for these matrices ...
6
votes
0answers
75 views

Mathematica package for explicit matrix representations of group generators?

While there are several packages that are capable of working with weights and roots (for example LieArt), I couldn't find any package that spits out explicit matrices for the generators, for example ...
7
votes
0answers
80 views

Choosing appropriate WorkingPrecision when solving numerical system of equations [closed]

Consider a linear system of equations, which is conveniently written as A.x=y. The matrix A has dimensions ...
2
votes
0answers
116 views

Suggestions for solving a large linear system

I have a system of $\approx 200,000$ linear equations in $\approx 40,000$ variables (with rational coefficients) and I would like to determine the dimension of the solution space, which I know to be ...
1
vote
0answers
116 views

MatrixExp of a complex matrix of size about 10000 by 10000 [closed]

I want to apply MatrixExp of a numerical, complex matrix of size about 10000 by 10000, and I also need high precision as I need to multiply several such matrices. ...
8
votes
2answers
182 views

Difficulty using LUDecomposition

I'm having trouble using LUDecomposition with pivoting. I read the Mathematica help on this particular command, but I'm still lost. Take a matrix like: ...
9
votes
2answers
237 views

Why is Mathematica eating a row from QRDecompostion

I'm attempting to calculate the QRDecomposition of the matrix: a = {{1, 3}, {0, 5}, {2, -8}} QRDecomposition[a] The answer ...
2
votes
0answers
74 views

Derivative of vector dot product with respect to a vector

I have the expression: Transpose[gvecI, {2, 1}].x (m[1] + m[2]) gvecI and x are [3x1] ...
4
votes
2answers
58 views

Inputting values into the variables without having to input the matrix all over again

I'm practicing using LU decomposition on Mathematica. I am able to find the L & U matrices, specifically the variables. However, i find it tedious having to input the newly found values and form ...
6
votes
2answers
348 views

Given a set of four linearly independent vectors, how can I compute two additional linearly independent vectors?

I have four linearly independent vectors: $$ \left( \begin{array}{c} \left\{\frac{1}{2},\frac{1}{2},0,0,0,0\right\} \\ \end{array} \right)$$ $$ \left( \begin{array}{c} \left\{\frac{1}{2 ...
2
votes
0answers
106 views

Parallel evaluation of symbolic matrix eigenvalues

I'm trying to find eigenvalues of symbolic hermitian 40x40 block matrix. It is made from 20 2x2 matrices like this: ArrayFlatten[Table[M[m,n],{m,1,20},{n,1,20}]] ...
2
votes
0answers
69 views

Approximate inverse of large sparse matrix with small diagonal element

I need to find inverse of a large sparse matrix with small diagonal element. I follow this question - Is there any way to obtain an approximate inverse for very large sparse matrices? and try to use ...
1
vote
0answers
58 views

How to remove parts of an expression

I have an expression where terms Transpose[R].R appear. R is a matrix with the property Transpose[R].R=IdentityMatrix[3]. How ...
5
votes
1answer
231 views

Distribute transpose on matrix multiplication

I need to do the following: Transpose[A.(B+C)]=Transpose[B].Transpose[A]+Transpose[C].Transpose[A] How should I do this in mathematica? So far mathematica does ...
7
votes
3answers
323 views

Can't find the eigenvectors of a simple 2x2 matrix

Bug introduced in 8.0 or earlier and fixed in 10.3.0 Why can't Mathematica find the eigenvectors of this matrix? ...