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

1
vote
0answers
10 views

Choosing appropriate WorkingPrecision when solving numerical system of equations

Consider a linear system of equations, which is conveniently written as A.x=b. The matrix A has dimensions ...
2
votes
0answers
41 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
101 views

MatrixExp of a complex matrix of size about 10000 by 10000 [on hold]

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. ...
-2
votes
0answers
66 views
8
votes
2answers
137 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: ...
7
votes
2answers
168 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 mathematica gives me is: - Q which is a ...
2
votes
0answers
51 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] ...
0
votes
0answers
49 views

How to replace element by element in a list? [closed]

I have the list: myList={{a,b,c},{d,e,f},{g,h,i}} I need to transpose every element individually, so I do: ...
0
votes
0answers
8 views

Don't understand about how to solve the first equation with Gauss Elimination [migrated]

Please take a look at the picture. My quesion is: How to solve the first equation with Gauss Elimination that is displayed in the picture. I don't understand HOW.
4
votes
2answers
46 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
312 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
42 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
36 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
44 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
98 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 ...
0
votes
0answers
4 views

What is X if position value is between 0 and 500 and I need it has -1 to 1? [migrated]

let's say I have a line from 0 to 500, and I'd like to know in which position a point is from -1 to 1, where centre is 250, how can I do that ? Any suggestions ? Thanks! So far this is what I've ...
6
votes
2answers
187 views

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

Bug introduced in 8.0 or earlier and persisting through 10.2.0 Why can't Mathematica find the eigenvectors of this matrix? ...
1
vote
1answer
62 views

Transposition of state space form of a transfer function

How can I transpose the output of state space model in Mathematica? trying the following code would transpose the top right symbol s instead of the matrices. ...
0
votes
1answer
70 views

Find all degenerate eigenvalues of a cubic equation

I have an equation that is cubic in w. The three solutions correspond to bands in a bandstructure, and are a function of wavevector ...
1
vote
1answer
68 views

Handle matrices and vectors with general dimension

I have a matrix of $n \times n$ dimension: $$ K - \omega^2 M = \begin{pmatrix} 2\omega_0^2 - \omega^2 & - \omega_0^2 & 0 & \cdots & 0 \\ - \omega_0^2 & 2\omega_0^2 - \omega^2 ...
0
votes
0answers
39 views

Signage of eigenvector [duplicate]

I am comparing eigenvectors generated from mathematica to matllab. It seems signage of eigenvector generated from Mathematica is opposite from what is generated from matlab. Can anybody review and ...
1
vote
0answers
35 views

Diagonal times dense matrix, high precision

I have a fixed dense matrix M of high precision numbers, say 40 by 40 and precision 40. Then I have a variable vector v of the ...
15
votes
0answers
193 views

Simple Matrix multiplication takes very long

Bug introduced in 10.1.0 I came across some strange behaviour during a computation involving matrices with symbolic values. It is reproduced below. Multiplying a random 30x30 array with symbolic ...
1
vote
0answers
28 views

Function to be used for spectral decompostion of matrix [duplicate]

Can anybody please help in finding out what is best way to do spectral decomposition (or Eigen decomposition) of the matrix. The details of Eigen decomposition can be found in attached link 1. ...
1
vote
0answers
47 views
2
votes
0answers
62 views

MatrixRank of a large but sparse matrix

I want to find the rank of a very sparse, quite rectangular matrix mat, but I'm running out of RAM (I have 16 GB) if I try to use ...
0
votes
0answers
48 views

Compilable function with the functionality of SingularValueList

I'm doing something that involves finding the singular values of a lot of matrices. Basically I need to find singular values of $n$ matrices of dimension $n\times n$, where $n$ is as large as ...
1
vote
1answer
84 views

Matrix multiplication for higher dimensional matrices [duplicate]

I have a matrix like this (myb1): I would like to get the matrix multiplication of each of the submatrix to itself. For example the first 2x2 matrix $\begin{bmatrix}1 & 2\\1 & ...
2
votes
1answer
71 views

Expand a product of operators

Lets suppose I have a family of operators $f_i$, and unknown c-numbers $a,b,c$. I want to expand such products: $(f_1+f_2+c)(f_3+f_2+b)$ into $b c+b f_2+b f_1+c f_2+c f_3+f_2^2+f_1 f_2+f_2 f_3+f_1 ...
0
votes
0answers
52 views

Is Eigensystem::eivin message a bug?

I noticed that in the question Request for clarification of Eigensystem::eivn message the error message Eigensystem::eivn: Incorrect number 2 of eigenvectors for eigenvalue ...
1
vote
1answer
59 views

Multiplying three matrices does not give expected form [closed]

I'm having lectures on analytic geometry. I've learned that there is an associated matrix multiplication for a quadratic form: $\quad \quad \left( \begin{array}{ccc} x & y & 1 \\ \end{array} ...
2
votes
0answers
32 views

How to get simultaneous eigenvectors of commuting matrices? [duplicate]

So let's say there are two square matrices A and B that commute (AB-BA=0). This implies that there must exist some complete set of vectors that are eigenvectors of both A and B. Is there any way to ...
1
vote
0answers
45 views

Does a matrix need to be rationalized when calculating MatrixExp? [closed]

I have a sparse matrix, L, and need to calculate its exponential, MatrixExp[L t], where t is ...
1
vote
1answer
55 views

Mathematica computes wrong eigenvectors? [closed]

I have a matrix M = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, b}, {0, 0, -b, 0}} that I want to diagonalize. So far, I always used the following and it worked, but ...
0
votes
1answer
108 views

Traces of products of Gell-Mann matrices in FeynCalc

I am working on an assignment in FeynCalc and I need to evaluate traces of products of two commutators of Gell-Mann (SU(3)) matrices, i.e. I need to calculate the ...
1
vote
0answers
40 views

reset the value of a variable [closed]

Folks, I have a problem in populating a matrix without overriding the values. After performing computations for various values for j, I want to store these values in following matrix. Here is the ...
0
votes
0answers
52 views

Null space of a stochastic matrix [closed]

I want to calculate NullSpace of a matrix m - IdentityMatrix[n]. Normally I would do it with ...
4
votes
2answers
112 views

Pauli matrices — simplify expressions without printing out the raw matrix

Squaring a Pauli matrix results in the identity matrix. These bits of documentation (weakly, to a Mathematica-newbie like me) imply that some algebraic identities that link the Pauli matrices ...
3
votes
1answer
85 views

Solve an eigensystem faster and eliminate Root[…] from the solution

I have a symbolic, 2-parameter, 8x8 matrix to solve, but Mathematica takes something like 20 minutes to solve it and returns a very large output containing expressions of the form ...
0
votes
0answers
34 views

Why is there a different eigenvector for the same matrix? [duplicate]

I have a matrix that depends on two variables x and y. Matrix[x,y] When I make x=-.25*(1 - 1/3) + .25*(1/3) + .25 y=0 I ...
1
vote
1answer
147 views

Efficient algorithm to generate a basis for exact diagonalization

The problem is described as follows: I need to generate a basis(matrix) in lexicographic order. For two different basis vector $\{n_1,n_2,\cdots,n_M\}$ and $\{t_1,t_2,\cdots,t_M\}$, there must exist ...
0
votes
0answers
53 views

Normalized, symbolic Eigenvectors without abs(), sign() etc

I'm trying to compute the normalized eigenvectors of a matrix M = {{0, 0, 0, 0}, {0, 0, M5, 0}, {0, M5, 0, M4}, {0, 0, M4, 0}} If I try Normalize ...
4
votes
1answer
175 views

Eigenvalues of matrix not giving imaginary parts

This might be a very simple problem, but I can't seem to figure out why I am getting this. I am trying to find the eigenvalues of the matrix: ...
1
vote
1answer
145 views

Transform linear system into a matrix form

I have a system of linear equations in variables $A_n$ of form: $$ \sum _{k=-K}^K h_k A_{n-k} J_{n-k}\left(\frac{(1-i) \text{$\eta $Sqrt}(n-k)}{\sqrt{2}}\right)+A_n\left(\frac{(1-i) \eta ...
0
votes
0answers
46 views

CharacteristicPolynomial returns 0

I have the following matrix. ...
2
votes
2answers
110 views

Reordering numerically calculated eigenvalues assuming smooth dependence on a parameter

As was discussed in a different question here on SE (link) if you compute eigenvalues numerically of a matrix which depends on a parameter y, the resulting plot of ...
0
votes
0answers
40 views

Can LinearSolve use Parallelize and WorkingPrecision in computation

I am looking for a two things while calculating the large array matrix equation: 1) To increase the precision in simple LinearSolve[] function 2) To find a way to parallelize the computation on all ...
8
votes
1answer
171 views

Possible Method for MatrixExp

Well, probably a hard question, but I think it's better to cry out loud :). I noticed that MatrixExp owns Method option when ...
1
vote
1answer
102 views

Extract coefficient matrix $A$ from expression $f(x)$

I have expression: $$f(x)=\sum_{i=0}^{K-1}\sum_{j=0}^{N-1}a_{i,j}e^{ix}x^j.$$ I want to extract coefficient matrix $A$ from expression $f(x)$ where $$A=\left( \begin{array}{ccccc} a_{0,0}& ...