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

0
votes
0answers
49 views

Eigenenergies of a symmetric tridiagonal matrix [on hold]

we consider the time independent Schrodinger equation (TISH) where we want to calculate the first few instantaneous eigenergies. Discretizing space we get : So we can rewrite the TISH as, (where ...
0
votes
1answer
32 views

Finding the magnitude a matrices [on hold]

I need some help. I have a list of 3 x 3 matrices of real numbers.I want to find how close each of these matrices are to a {{0,0,0},{0,0,0},{0,0,0}} matrix. Any suggestions to a method algorithm or ...
1
vote
1answer
112 views

The new introduced EulerMatrix problem

In the present version of Mathematica, there is a new command EulerMatrix[{α, β, γ}])// MatrixForm I read its document and I still don't understand it. For me, ...
6
votes
2answers
314 views

Cross product between two lists of vectors

I'm trying to create a function that does the cross product between two lists of the same dimensions, element by element. Each entry of the list is a 3D vector. Something like this: ...
1
vote
1answer
58 views

Counting flops to compare to operations

I know there is a Timing approach, but I am wondering if there is a Mathematica command that will count the number of flops (floating point operations). For example, if I do: ...
2
votes
0answers
64 views

Aguilera-Perez Algorithm of $nD$ rotation matrix [on hold]

I want to compute a general $nD$ rotation matrix which corresponds to a rotation by an angle $\theta$ around an $(n−2)$-dimensional subspace. I found the Aguilera-Perez algorithm in their paper: ...
1
vote
0answers
53 views

Problem with Volume and Parallelepiped [on hold]

This worked (copied from the documentation), and gave correct image with Graphics3D. R = Parallelepiped[{0, 0, 0}, {{1, 0, 0}, {1, 1, 0}, {0, 1, 1}}]; Volume[R] ...
4
votes
3answers
97 views

Expanding a matrix in a set of matrices

Consider a vector $a=\{a1,a2,a3\}$. I computed $e^{i a\cdot \sigma}\qquad \sigma: {\rm Pauli\ matrices}$ and then applied the command ExpToTrig. Now I want to expand the above result in terms of ...
0
votes
0answers
69 views

Gauss-Jordan program in Mathematica

Hi to everyone I made this program to solve a linear system by Gauss Jordan, this is my code to solve the system: ...
2
votes
2answers
118 views

Symbolic linear algebra gradients/matrix calculus

Can Mathematica generate symbolic expressions for gradients? For example, if $x_1$ and $x_2$ are two points, could I get Mathematica to generate expressions similar to the following? $\frac{\partial ...
3
votes
1answer
100 views

Efficiently compute this Table of NullSpace

I have two $(2n,2n)$ matrices, $A_1$ and $A_2$, and I would like to compute $$\ker(A_1^p A_2^q -I)$$ for $p,q\leq 2n$. Both matrices are orthogonal and have exactly four non-zeros values on each ...
9
votes
4answers
5k views

Matrix Multiplication in context of row and column vectors

I've been looking at some matrices in Mathematica and I've noticed something very weird: They're extremely temperamental when it comes to dot products! For example, if I have the following, ...
0
votes
0answers
37 views

Compiling LinearSolve with 2 complex matrices, possible bug

Take two complex matrices depending on one variable, for example: ...
26
votes
5answers
965 views

Can (compiled) matrix permanent evaluation be further sped-up?

Update III  Mathematica 10.2.0 now ships with a predefined System`Permanent function, which the PermanentCode package ...
2
votes
1answer
65 views

Linear regression

I have a sequence of data: data = {0.647888, 0.522495, 0.454224, 0.417054, 0.396816, 0.385798, 0.379799, 0.376532, 0.374754, 0.373786, 0.373259, 0.372972} How ...
1
vote
1answer
92 views

Why is KroneckerProduct[vector, vector] a matrix in Mathematica, not a vector?

"If $A$ is an $m \times n$ matrix and $B$ is a $p \times q$ matrix, then the Kronecker product $A \otimes B$ is the $mp \times nq$ block matrix..." from Wiki Thus the Kronecker product of two ...
5
votes
1answer
2k views

How to obtain the orthogonal matrix that diagonalize a symmetric matrix [closed]

I have a real symmetric matrix H which is in symbolic form, I need a matrix P that can diagonalize H; also P is orthogonal and its columns are the eigenvectors of H. How can I doing this in ...
-1
votes
1answer
51 views

Orthonormalization of a set of vectors

I know of the commands Orthogonalize[] and Normalize, but how can I combine them into one command that its output will be an orthonormalized list of the input vecotrs? Thanks in advance. P.S How to ...
0
votes
1answer
50 views

How can we do LDU decomposition modulo $p$?

If we have an $n \times n$ matrix, with all entries taken modulo $p$, how can we output the three matrixes in LDU decomposition, with all entries again modulo $p$? We can assume the input matrix is ...
2
votes
0answers
27 views

Using Arnoldi Method with Multiple Options

I have a matrix with many complex eigenvalues, but I only need a few near a particular complex number. I am only looking at the imaginary parts, so I need the few closest on the imaginary scale to my ...
3
votes
1answer
47 views

Use of Inverse Matrix

I solved a matrix as follows: {{0,1,1},{0,2,4},{0,3,9}}.{{0},{25},{20}} Resulting: {{45},{130},{255}} I tried to use an ...
11
votes
4answers
3k views

Axis/Angle from rotation matrix

With r=RotationMatrix[a,{x,y,z}] I can compute a 3D rotation matrix from axis/angle representation. Given a 3D rotation matrix r...
1
vote
1answer
67 views

A question on JordanDecomposition in Mathematica

How can I have Mathematica show me also the inverse matrix of the similarity matrix of JordanDecomposition of a matrix? Obviously I need to use here the ...
13
votes
2answers
318 views

$3\times 3 = 6 + \bar{3}$ in Mathematica?

Can Mathematica handle this type of algebra, which is used very frequently in e.g. particle/nuclear physics? That is, I want to decompose a product of representations (in $SU(N)$ say) into irreducible ...
1
vote
2answers
119 views

How to plot a lattice (2D or 3D) given a basis

I want a graphical picture of a lattice with basis such as $\{(1,1), (\sqrt{2}, -\sqrt{2})\}$. Does Mathematica already have a pre-made function that finds all linear combinations over $\mathbb{Z}$ ...
2
votes
3answers
189 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 ...
-1
votes
1answer
66 views

How to correctly calculate symbolic eigenvectors

I give a minimalistic example of my problem: I have a matrix: m[a_,b_]:={{0,-a+b},{b,0}}; I define the eigenvectors as: ...
2
votes
1answer
79 views

Solving for five unknowns in a 3 x 3 matrix

I know that matrix.Transpose[matrix] = IdentityMatrix[3] matrix = {{0.8111, 0.4867, -0.3244}, {a,b,0}, {c,d,e}} I tried ...
3
votes
2answers
131 views

GridLines for a coordinate system with a particular basis

Suppose that I use the vectors (2,1) and (-1,1) as a basis for $R^2$. ...
17
votes
4answers
353 views
1
vote
2answers
857 views

How to simulate the response of a linear parametric varying system in Mathematica?

Consider the following system \begin{align} \dot{x}(t)&=\sum_{i=1}^{2}\rho_{i}(x(t))\left[A_{i}x(t)+B_{i}u(t)\right]\\ y(t)&=Cx(t) \end{align} with: ...
2
votes
1answer
51 views

Finding an Integer, Unimodular Matrix that connects two given matrices

I have two symmetric, integer matrices, $K$ and $K_2$ which have the same determinant and the same signature (number of positive - number of negative eigenvalues). I want to find an integer valued ...
4
votes
2answers
835 views

Solving a linear equation in Mathematica

This should be easy but I can't seem to find the right way to do it. I have an equation of the form $a x + b x + c y + a z + d z = 0$, and I'd like to solve for relations between the parameters $a,b,...
6
votes
2answers
269 views

Find a condition that b must satisfy so that Ax=b has solution

I'm new to Mathematica, so I'm sorry if this is really simple. I am trying to find the condition that vector b must satisfy so that Ax=b has solution. I would like to learn a general method, but I'll ...
0
votes
2answers
548 views

Mathematica Implementation of Householder’s Method

I typed the Householder code in this paper, which starts on page 7. The code is: ...
0
votes
0answers
19 views

General question about solving a large set of linear equations efficiently

In my research, I got a large set of linear equations, about 10 000 equations with more than 10 000 variables. It is not efficient to use "Solve", so does anyone know any way to solve the equations in ...
7
votes
3answers
380 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? ...
1
vote
1answer
56 views

Fast Eigensystem calculation

I have a code which finds the eigensystem for a matrix H = H0 + x HInt, where x is a variable which turns on the interaction. H0 is diagonal, and HInt is a sparse matrix (with about 400 states, I hope ...
2
votes
0answers
90 views

How does Mathematica compute the determinant of a matrix? [closed]

I have been trying to write efficient code for calculating the matrix determinant for some time now. I noticed last night that Mathematica is able to compute the determinant of a $200 \times 200$ ...
3
votes
1answer
123 views

Optimize a parametric matrix to get a lowest possible eigenvalue

This question is a followup of Plot the lowest eigenvalues of a parametric matrix Now I can get the lowest eigenvalue LowEign(t) of the matrix for a given t numerically. When I plot the LowEign ...
1
vote
1answer
154 views

How do you solve a linear equation of matrices? [duplicate]

The function Solve works fine for scalars: In[]:= Solve[A x - x B + C == 0, x] Out[]= {{x -> -(C/(A - B))}} When using matrices however, ...
2
votes
0answers
56 views

Why can Mathematica compute numerical sums more efficiently when they are written as matrix operations?

Let $f(n)$ and $K(n,m)$ be functions such that the double sum, which we wish to evaluate numerically, $$ \sum_{n=1}^a \sum_{m=1}^a f(n) f(m) K(n,m) $$ exists when $a$ is some large positive number. I ...
0
votes
0answers
57 views

Learning Mathematica for Math Majors [duplicate]

I just downloaded Mathematica and I'm taking a course in Multivariable Calculus. I realize there is a lot of complexity to Mathematica and there are Many types of learning resources out there. I was ...
2
votes
1answer
66 views

Accuracy limitations of singular value decomposition?

in the process of working on a physics problem I have found the need to use the singular value decomposition function built into Mathematica. I have encountered what seem to be limitations to the ...
1
vote
0answers
50 views

Dealing with answers that have Root[ …] when finding an Eigensystem [duplicate]

This is a 3x3 matrix and I think it should solve for the expressions in terms of radicals. I am not sure what to do with this.
1
vote
0answers
151 views

Request for clarification of Eigensystem::eivn message

What causes the problem of "two eigenvectors associated to one single multiplicity eigenvalue" that I am experiencing? After several transformations to simplify an unwieldy matrix, I end up with the ...
0
votes
0answers
101 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 Root[<<14>>+(<&...
0
votes
1answer
88 views

How to get rid of # in answer (eigensystem)? [duplicate]

I was trying to find the eigensystem of the following matrix (act as if the second character is in subscript): \begin{pmatrix} 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \frac{-\...
0
votes
0answers
26 views

Ordering of Eigensystem in symbolic computations [duplicate]

Suppose I have a symbolic 4x4 matrix for which I am finding the Eigenvectors and Eigenvalues. My question is whether Mathematica ...