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

2
votes
0answers
47 views

Eigenvalues of large symmetric matrices

When I try to compute the eigenvalues of the adjacency matrix of a very large graph I get, what can be charitably described as, garbage. In particular, since the graph is four-regular, the eigenvalues ...
0
votes
1answer
45 views

Improve speed of Nested Matrix exponential

I have a short Code example and I want to know whether it is possible to improve the speed. The L matrix in my code is a SparseMatrix, but for this question I just use something similiar. ...
2
votes
3answers
166 views

Create a 900x900 matrix and diagonalize it

I have to create a 900x900 matrix and then diagonalize it. It is something similar to the below matrix. The value of a,b,c,d....up to 900 values (which are the first column and row) are the number. ...
1
vote
1answer
77 views

Gram-Schmidt Process

I've discovered the Orthogonalize command: Clear[x1, x2] x1 = {1, 1, 0}; x2 = {-2, 0, 1}; Orthogonalize[{x1, x2}, Method -> "GramSchmidt"] Which returns an ...
6
votes
2answers
213 views

Solve a system of M equations without specifying M [on hold]

I am trying to write my game-theoretic model in Wolfram Language. There is only one remaining step and I am not sure if it is within reach of Wolfram Language (or Mathematica). I describe a simplified ...
0
votes
0answers
37 views

Mathematica Not finding Eigenvectors? [duplicate]

I have the following matrix: mat = {{-60., 0., 2.1*10^-35 II + 2.1*10^-35 (-1. II + Istar), 2.1*10^-35 II + 2.1*10^-35 (-1. II - 4.7619*10^6/Istar)}, {-6.4*10^22 II - 6.4*10^22 (-1. II - ...
6
votes
2answers
328 views

NullSpace[_, Method->“OneStepRowReduction”] is sometimes wrong; how can I work out when this happens?

Edit 2015: Has this been fixed yet? (This is on MMA 7.0.1.0 on OS X) I've just found a large matrix m for which NullSpace[m] ...
-1
votes
0answers
55 views

Creating a Symbolic Singular Matrix

I am trying to differentiate an expression involving a matrix. When evaluating the input, Mathematica assumes the matrix is invertible, when it is not. How do I specify a symbolic singular matrix to ...
3
votes
1answer
70 views

Generating plane equation from LinearSolve

I will ask a simple question and might have an issue on the site that explains better about it, but not found. I am formulating a code that defines me an equation that I can generate a plot. ...
0
votes
0answers
27 views

System of Inequalities with symbolic parameters

I am trying to solve the following system of inequalities in Mathematica but the output is just the same system of inequalities. I need to get the expressions for ...
1
vote
3answers
233 views

Generating a vector basis

I have several lists parameterizing a vector space, for instance {a[1],a[2],a[1]+2 a[2]-a[3]} For each list I want to generate a basis such as ...
3
votes
2answers
172 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$. ...
4
votes
1answer
58 views

Why am I losing precision in computation of eigenvectors of sparse matrices?

I compute the eigenvectors and eigenvalues of the same matrix in its dense and sparse version. The eigenvalues are the same to great precision, but the eigenvectors are not: when I compute the ...
1
vote
1answer
82 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 ...
2
votes
1answer
106 views

Grabbing the independent columns of a matrix A

I found a nice way to generate a random $5\times 7$ matrix with rank 3. MatrixForm[A = RandomInteger[5, {5, 3}].RandomInteger[5, {3, 7}]] MatrixRank[A] Let me ...
7
votes
1answer
405 views

How to produce the ILU0 or ILUT as stand-alone procedures on sparse matrices?

Mathematica uses the ILU0 procedures automatically to precondition large sparse linear systems; e.g. ...
7
votes
2answers
3k views

How do I keep the right ordering of eigenvalues using Eigensystem?

I'm having an issue with the Eigensystem command. I need to diagonalize a bunch of 3 by 3 complex valued matrices, but more importantly, I need to keep the exact ...
5
votes
3answers
320 views

Bilinear Dot Function

In mathematics the matrix product is a bilinear operation $$ \alpha A \cdot(\beta B + \gamma C) = \alpha\beta ( A \cdot B )+ \alpha \gamma (A\cdot C ), $$ where capital letters denote matrices and ...
2
votes
1answer
143 views
0
votes
1answer
34 views

Finding the magnitude a matrices [closed]

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
120 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
332 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
61 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: ...
1
vote
0answers
71 views

Aguilera-Perez Algorithm of $nD$ rotation matrix [closed]

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
57 views

Problem with Volume and Parallelepiped [closed]

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
106 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
75 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
120 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
102 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
39 views

Compiling LinearSolve with 2 complex matrices, possible bug

Take two complex matrices depending on one variable, for example: ...
26
votes
5answers
982 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
66 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
98 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
53 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
51 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
28 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
49 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...
13
votes
2answers
320 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
129 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
193 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
68 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
80 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 ...
17
votes
4answers
360 views
1
vote
2answers
866 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
52 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
841 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,...