Questions on the linear algebra functionality of Mathematica.

learn more… | top users | synonyms

1
vote
1answer
50 views

Multiplying three matrices does not give expected form [on hold]

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
30 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 ...
0
votes
0answers
51 views

OLS Estimation - Computational results vs. calculation by hand [on hold]

I calculated the OLS estimators for a data set by hand using $$\hat\beta=(X^TX)^{-1}X^Ty$$ If I check my results with Mathematica I get different results. I'm quite sure that I didn't make any ...
1
vote
0answers
42 views

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

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

Mathematica computes wrong eigenvectors? [on hold]

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
83 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 ...
0
votes
0answers
13 views

Symbol in Linear Algebra [migrated]

I'm newbie in linear algebra and I do not understand the symbol that is selected with blue color. What does this symbol means? What is the purpose to use this symbol? What context is this symbol ...
1
vote
0answers
38 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
47 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
79 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
80 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
33 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
126 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
44 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
170 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
140 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
66 views

Handling $n$-dimensional vector expressions [closed]

I have a question about how to write a formula in Mathematica. When $w$ is an $n$-dimensional vector, with each element in the form $w_i : i=1,2,3,...n$ and $n$ is symbol, how can I write this vector ...
0
votes
0answers
44 views

CharacteristicPolynomial returns 0

I have the following matrix. ...
2
votes
2answers
105 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
36 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
167 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
99 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}& ...
3
votes
1answer
127 views

$\mathbf L\mathbf D\mathbf L^\top$ Cholesky decomposition

Mathematica can do a Cholesky decomposition $\mathbf A = \mathbf L\mathbf L^\top$, but how do I do a LDL decomposition $\mathbf A = \mathbf L\mathbf D\mathbf L^\top$, with $\mathbf L$ being a unit ...
2
votes
1answer
61 views

Algebraic Manipulations with Indices

I am absolutely new to Mathematica, but I've heard it is a pretty powerful tool for symbolic calculations. My problem (stated generally): I have three dimensional array. I define a symbolic operator ...
4
votes
1answer
52 views

Finding maximal subset of linearly independent functions

I've got a set of functions in one variable. I wish to find the basis of the corresponding spanning set Example: $$\left\{1,\frac{1}{1-\sqrt{x}},\frac{1}{1-x},\frac{\sqrt{x}}{1-x}\right\}$$ may ...
3
votes
0answers
68 views

LinearSolve and Krylov Method options

I need to solve a large, sparse, linear system. At some point Method -> "Multifrontal" fails and a bit later also "Pardiso" ...
1
vote
3answers
206 views

Using mathematica to visualise solution of vectors and planes

Im struggling with a question I'm my math book and I wanted to use mathematica to visualise it for me, the problem is that I don't even get something remotely similar to what I was expecting. How here ...
1
vote
1answer
84 views

Are variables always assumed to be real in Jordan Decomposition?

If you give the Input in Mathematica 9.0 (Student Edition) JordanDecomposition /@ ({{1, #}, {#, -1}} & /@ {i, I}) Mathematica gives you two completely ...
4
votes
2answers
62 views

Using LeviCivitaTensor

I have 2 questions about using LeviCivitaTensor, based on the following session: The signs for the cross product seems to come out "opposite" of what I expected. Why is that? Did I miss anything? ...
1
vote
1answer
65 views

Eigenvectors with imaginary part

I am working on the following: ...
1
vote
2answers
68 views

Create a random 2×2 matrix with a repeated eigenvalue and single eigenvector

Does anyone have a good technique for creating a random $2\times 2$ matrix that has one eigenvalue of multiplicity two, but only a single eigenvector? And more generally, has anyone written a ...
2
votes
2answers
175 views

Are there any good mass row/column swapping functions for matrices?

I have the following matrix Keeping the 20 row and 20 column fixed (so the 21st rows and columns because I started at 0)...how do I push each row and column back one spot? I need to push the 0th row ...
5
votes
1answer
105 views

Checking if a symbolic matrix is positive semi-definite

As far as I can tell, there is no way to tell the builtin PositiveSemidefiniteQ about assumptions on symbols. For example, the matrix ...
3
votes
1answer
197 views

How to draw a tropical surface?

By definition, a tropical surface in $\mathbb R^3$ is the set of points $(x,y,z)$ where the maximum $f=max(f_1,f_2,\dots,f_n)$ is attained at least twice, here $f_i$ stand for some linear functions of ...
0
votes
0answers
74 views

Solving symbolically large system of underdetrmined linear equations

I would like to find matrices 3x3, say A, B, C, such that for all symmetric matrices X, with zero trace, one has: $$AX_1+BX_2+CX_3=0, AX_2=BX_1, AX_3=CX_1, BX_3=CX_1$$ where $X_i$ denotes i-th row (or ...
0
votes
0answers
25 views

How do I get Mathematica to evaluate symbolic linear algebra [duplicate]

First of all, I am VERY new to Mathematica. That said...I have defined vectors as: e1=2x-y and e2=x+y (x and y are orthonormal). I also defined the dot products of x and y in Mathematica. I want to ...
1
vote
1answer
121 views

Forcing solutions to avoid Root[]

I'm solving a system of ordinary non-homogeneous differential equations (4 equations). The solutions will include some algebraic equations solutions as known from text books due to the use of an eigen ...
5
votes
3answers
467 views

Verify Cayley-Hamilton Theorem

Consider the matrix: A = {{-1, -4, -2}, {0, 1, 1}, {-6, -12, 2}} Now, the characteristic polynomial is found: ...
4
votes
1answer
138 views

Proving positive definiteness or semi-definiteness of a matrix

I have the following 4x4 real symmetric matrix: $K=\begin{bmatrix}3-3w & -\frac{4}{3}+a+2w & \frac{5}{12}+b-\frac{w}{2} & 0\\ -\frac{4}{3}+a+2w & -1-6a-3x & ...
2
votes
0answers
70 views

Simplify large fractions

Hi i'm quite new with Mathematica and i'm experiencing some problems with Simplify and FullSimplify. I'm dealing with a sistem ...
2
votes
1answer
76 views

Row echelon form question

I am wondering if there is a Mathematica command that will put a matrix in row echelon form. That is, put $$ \begin{bmatrix} 1 & 2 & 3\\ 2 & 3 & 4\\ -1 & 0 & 2 \end{bmatrix} ...
1
vote
0answers
20 views

What is the most efficient method to find a single eigenvector with eigenvalue that is numerically 0?

I need to find an eigenvector of a (numerically calculated) square matrix M corresponding to the eigenvalue 0. The methods I know are ...
0
votes
1answer
67 views

Creating a random make matrix with a particular rank

Does Mathematica have a built-in function that will return a random mxn matrix with rank r?l
2
votes
1answer
64 views

Inverting matrix with assumptions

I want to invert a matrix that contains some variables, so I thought I should give some assumptions to Mathematica to speed up the process. How do I assume that $s0,...,s8$ are positive constants ...
1
vote
1answer
132 views

Why can't Mathematica compute the null space of these matrices?

I'm writing a library of functions to work with musical pitch-class vectors. One of my functions gives me a skew-symmetric matrix modulo 12 that corresponds to the differences between components of ...
0
votes
3answers
151 views

Calculating eigenvalues of a large matrix takes a long time

I have a tridiagonal matrix (1000×1000) with each element equal to $1$ except {n,n}=2. It takes 8 hours to give me the eigenvalues?!! Here is the code I used: ...
0
votes
0answers
73 views

Calculating the rank of an abstract matrix

I'm trying to compute the rank of a 4x4 matrix with 4 parameters and 2 variables. I tried to calculate its rank under some assumptions on those conditions and I kept getting rank 4. So I did an ...
0
votes
0answers
25 views

How to obtain the eigenvector corresponding to the minimal eigenvalue of a generailzed eigenvalue problem [duplicate]

Suppose I have the following input a = Import["d:\am.txt", "Table"]; b = Import["d:\bm.txt", "Table"]; c = Eigenvalues[N[{a, b}, 5]]; Min[c] where am.txt is 3.0 2.0 2.0 3.0 bm.txt is ...
0
votes
2answers
70 views

Zero division in linear equation solution

I'm trying to transform a vector to another coordinate system with different root vectors. The other root vectors are defined by three points in space that form a plane, and it's a normal vector. ...
-1
votes
1answer
53 views

Graphing a vector [duplicate]

I have a vector (in physic) designated asF1=250cos(60)i+250cos(60)j+250cos(45)k, and i would like to see it in a 3D graphic with the axis centered at the origin, after what i would include other ...