Questions on the linear algebra functionality of Mathematica.

learn more… | top users | synonyms

0
votes
0answers
24 views

What are the upper bound and stability conditions for the following simple linear system [migrated]

Consider the following linear system $$\dot{x}=\sum\limits_{i=1}^{m}{{{\alpha }_{i}}}\left( t \right)\cdot {{A}_{i}}\cdot x \quad (1) $$ where, $x\in {{\mathbb{R}}^{n}}$ represents the state vector, ...
2
votes
1answer
43 views

How to pick out terms in a linear equation with a positive coefficient?

Basically I have a really large output which looks like a long linear equation $AAA-BAA-CAA+DAA+...-ZZZ$ And I only am concerned about those terms that have a positive coefficient (i.e. a plus in ...
-2
votes
1answer
56 views

$SU(4)$ Structure constants in mathematica

How can I write a mathematica function which will output arbitrary structure constants of SU(4)?
1
vote
0answers
82 views

How to make Eigensystem in version 10 produce the same results as version 9 [duplicate]

The Eigensystem in version 10 seems to give slightly different results as in version 9: ...
0
votes
0answers
36 views

How to solve equations over polynomial rings

sorry if my question is very basic but I don't know what to even search to look it up and the only "obvious" places I thought of had nothing. Some background, for whatever context it might provide. ...
6
votes
2answers
191 views

How to estimate the matrix condition number in the 2-Norm?

The Mathematica documentation say it is possible to estimate the Matrix condition number in norm 1, 2, Infinity. But the 2-Norm raise a message. This is an extract from reference documentation ...
0
votes
1answer
104 views

LinearSolve failing to find solution to system of linear equations of 64 variables

I've got a 64x64 Matrix L for which I want to find the solution to the matrix equation L . x == rho. L is defined as ...
0
votes
1answer
86 views

eigenvector bug also for matrix with numeric value [closed]

I just realize that probably there is a bug also in calculating the eigenvector of a matrix with numeric values (see here for bug in eigenvector calculation with symbolic value). In particular in my ...
2
votes
1answer
89 views

Matrix constructed as a function inside a for-loop [closed]

I am trying to construct a matrix A which depends on variables x and y through iteration. My ...
0
votes
2answers
50 views

Modifying elements of a matrix after construction [closed]

Suppose I have constructed a matrix with all elements as a constant (say 1): N=4; A=ConstantArray[1, {N, N}]; Now I want to make A(2,3)=23 and A(4,3)=43. Can I ...
6
votes
1answer
188 views

How get eigenvectors without phase jump?

I'm using Eigenvectors to get the eigenvectors for some matrixes, but the eigenvectors seems to have some phase jump. Here is an example: Say we have a 2 by 2 ...
0
votes
1answer
54 views

Any command for group products?

Is there any Mathematica command or well known technique to take the direct product between two symmetric/permutation groups?
0
votes
1answer
81 views

How to power-series expand determinants?

Say $g$ is a matrix which is given as, $g = g_0 + xg_2 + x^2 g_4 .. +x^{d/2 -1}g_{d-2}+ x^{d/2}(g_d + h_d(log (x)))$ where $d$ is an even number and each $g_i$ is a matrix (same dimension as $g$) and ...
1
vote
1answer
75 views

how to find iso-cost contours on a 2d plot efficiently

Consider a 2D plot in which dimension 1 and 2 represent quantity 1 and 2 respectively ranging over 0 to 100. Each point in the space corresponding to (x,y) represent cost of choosing quantity 1 as x ...
0
votes
1answer
121 views

Differences between 'Solve' and 'LinearSolve' [closed]

Using the function 'Solve' I can do the following: Solve[a x + y == 7 && b x - y == 1, {x, y}] I get the following output: I want to get the same output using 'LinearSolve' instead. How ...
3
votes
1answer
149 views

Control over the way matrix is displayed

I am wondering how to change the output format in Mathematica. For example, I have $x=\binom{3}{1}$ and $y=\binom{2}{5}$, and I want to find what linear combination of $x$ and $y$ produces ...
2
votes
1answer
76 views

How to Normalise / Normalize eigenvectors? [closed]

I have a matrix and am trying to find the normalised eigenvectors of it. I am using the Eigensystem command and am getting a result. There is a normalize command, but as far as I can see this ...
1
vote
1answer
105 views

Compute symbolic Expectation of a summation

I am required to computed following Expectations : $E[\displaystyle\sum\limits_{i=1}^N \frac{X_{i}}{N}] = \bar{x}_{0}$ & $E[\displaystyle(\sum\limits_{i=1}^N \frac{X_{i}}{N})^2] = ...
1
vote
0answers
68 views

The Jacobi-Davidson method

Does any implementation of the Jacobi-Davidson method for Mathematica exist? A highly parallelized version for sparse matrices would be of special interest.
1
vote
1answer
47 views

Correctly substituting a matrix into a scalar equation [duplicate]

I am having trouble correctly substituting a matrix into an (originally) scalar equation. For example: A = {{3, 1}, {1, 2}} cp = CharacteristicPolynomial[A, x] ...
1
vote
1answer
50 views

Simplification of linear algebra [duplicate]

I have a few vectors defined as V1 = Array[v1,3] V2 = Array[v2,3] V3 = Array[v3,3] And I am trying to solve a very simple equation along the lines of ...
1
vote
0answers
79 views

Diagonalization in parallel

I would like to diagonalize one unitary non-sparse matrix of size 12870 with complex number entries (not symbols, this is really a numerical problem). Is is possible to make eigensystem run in ...
0
votes
1answer
153 views

How to create a 2D array (matrix) [closed]

I am pretty new to Mathematica. I need to create 2d array dynamicly. I got some code in C++(Qt) and it looks like this: ...
1
vote
0answers
68 views

Find eigenvalues without filling the matrix

Is it possible to find eigenvalues of a matrix without filling it? The matrix elements are given by a known function f[p1,p2]. This is relevant for a matrix too ...
2
votes
3answers
225 views

Treat strings as variables?

I have a list of strings, {"x1", "x2", "x3", "x4"} And a list of linear equations: ...
0
votes
0answers
70 views

Is there a way to solve the linear equation, Ax=b, in which A is a “non-constant” sparse matrix that depends on x?

I want to solve the Linear Equation, $Ax=b$ in Mathematica using Kylov subspace solver method preferably BICGSTAB(http://en.wikipedia.org/wiki/Biconjugate_gradient_stabilized_method). Suppose ...
8
votes
1answer
164 views

Is there a built-in procedure for simultaneous diagonalization of a set of commuting matrices?

Given a set $\{A_1,...,A_m\}$ of $m$ commuting $N\times N$ diagonalizable matrices, it is known that there exists a basis of eigenvectors $\Lambda$ that simultaneously diagonalizes all the $A_i$. Is ...
1
vote
1answer
189 views

Traces of products of Pauli matrices

Given a matrix $M$ of shape $2^L*2^L$, I would like to compute all the traces $\text{Tr}( M.(\sigma^{n_1}\otimes\sigma^{n_2}\otimes\ldots\otimes\sigma^{n_L})) $ for $n_1=1...4$, $n_2=1...4$, ..., ...
0
votes
0answers
43 views

How to get integer/rational and real eigenvectors to be the same? [duplicate]

forgive me if I missed this already being answered or too easy. Given a matrix: q = {{1, 3, 5}, {7, 11, 13}, {1/3, 1/7, 1/13}}; Eigenvectors are different here: ...
2
votes
1answer
51 views

How to distribute PermutationProduct over the sum

Assuming I have two elements of the permutation group algebra $a_1$, $a_2$ such that $a_i=\sum_{p\in S_n}\alpha_pp$, I want to define a linear product $\odot$ that distributes over the sum and pulls ...
0
votes
1answer
151 views

Simplify matrix into an upper triangular matrix

I have a tridiagonal matrix that I am trying to simplify into an upper triangular matrix using Mathematica, so I can use back substitution and solve my linear system. I have found the command ...
2
votes
1answer
93 views

Problem with Eigenvectors when given a matrix containing approximate numbers and symbols

I'm trying to diagonalize a certain 2 x 2 matrix, but Mathematica refuses to find the eigenvectors. In particular, when I input ...
1
vote
1answer
69 views

Efficient calculation of diagonal matrix elements

I have a matrix $V$ of size $M$ in which each row $i$ is a vector $v_i$. Now I have another matrix $H$ and I would like to calculate as efficiently as possible the list of values $v_i^\dagger\cdot ...
0
votes
2answers
155 views

Eigenvector Anomaly

I'm trying to compute the eigenvectors for: $$ M = \left( \begin{array}{ccc} 1 & 4 \\ 4 & 100 \end{array} \right) $$ Both myself and Mathematica report the eigenvalues as: $$ \lambda_1 = ...
1
vote
0answers
77 views

What is the fastest way to obtain the eigenvalues of a Wishart matrix?

I would like a fast method of creating a sample of random numbers which corresponds to the eigenvalues of a Wishart matrix: For M>N the eigenvalues \lambda_i are given by the jpd Where $K_N$ is ...
6
votes
1answer
354 views

Find the eigenvector associated with the smallest eigenvalue, not smallest in magnitude

I am trying to find the eigenvector of a $20000 \times 20000$ sparse matrix associated with the smallest eigenvalue. I realized that the smallest eigenvalue might be negative; for example, if the ...
1
vote
2answers
248 views

Using the epsilon tensor in Mathematica

I'm having a great deal of trouble getting started on a weekly homework assignment in Mathematica. The assignment requires we use the epsilon tensor which is apparently built into Mathematica as ...
7
votes
1answer
382 views

What type of solver does Mathematica use in LinearSolve

I have a question regarding linear equation solvers. For a specific 9x9 diagonal matrix, every method I tried in C++ (Gaus, GCC, BICGTAB ) wouldn't work, although these methods would work fine for ...
0
votes
0answers
46 views

Addition of sparse array objects [duplicate]

I have been having some trouble with the addition of large (but very sparse) matrices using SparseArray. Here is the simplest example to illustrate the issue. First, I will define diagonal matrices ...
10
votes
3answers
739 views

Plot Matlab icon

I started to explore this on a whim and hasn't succeeded yet… Some introduction for the icon is found here but I can't understand it very well. (I admit that, though playing with ...
0
votes
0answers
121 views

Memory issue when using LinearSolve

When I use LinearSolve to solve a large system of linear equations where the left hand side is a matrix and the right hand side is a vector, the process takes a ...
1
vote
1answer
126 views

What is most efficient way to convert system of equations to collection of functions?

I have the type of system M.x = b, where M is a known matrix and b is a known vector. M contains many parameters, call the entire parameter set 'a', so M => M[a]. I want to be able to efficiently ...
1
vote
0answers
79 views

(Symbolic) LinearSolve is slower/different after upgrading to Mathematica 9

Yesterday I upgraded from mathematica 8.0.4.0 to 9.0.1.0. Trying to run the same notebook I used many times before, it takes ages to evaluate a symbolic (linearsolve) expression which before was ...
1
vote
1answer
96 views

Solve equations for all values of variables, rejecting certain types of solution

I have an expression, expr, containing 3 variables, 4 coefficients and 2 non-zero generic constants. I want to solve for the 4 coefficients such that the equation ...
0
votes
1answer
114 views

Why Eigenvalues thinks matrices are non-numerical

I use Mathematica version 9.0.1. ...
1
vote
1answer
75 views

Why TensorReduce not working here?

I would like to use TensorReduce to work on the tensor contraction $y_{ib}y_{ia}$ (where index $i$ is summed). However, ...
3
votes
0answers
119 views

Discriminant of Characteristic Polynomial

I'm doing a calculation which finds the characteristic polynomial of a matrix with rather complex entries and then determines the discriminant of that polynomial. For smaller matrices up to around 7x7 ...
1
vote
2answers
97 views

Solving a linear system

When I tried to solve the equation below, I got the $4$ errors. Since I am pretty new on Mathematica, I don't know what I did wrong. $24x_1+20x_2+16x_3=4$ $20x_1+20x_2+19x_3=36$ ...
0
votes
1answer
85 views

LinearSolve symbolic equations

I am trying to use mathematica to solve the following system of equation, but I can not for the life of me get it to work. I have the following: ...
1
vote
0answers
70 views

How does TensorReduce use assumptions?

I would like to use TensorReduce by assuming that certain patterns of functions are tensors. From documentation of TensorReduce: ...