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

$SU(4)$ Structure constants in mathematica

How can I write a mathematica function which will output arbitrary structure constants of SU(4)?
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 ...
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
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] ...
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: ...
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: ...
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 ...
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 ...
0
votes
1answer
114 views

Why Eigenvalues thinks matrices are non-numerical

I use Mathematica version 9.0.1. ...
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 ...
0
votes
1answer
194 views

Symbolic Jacobian computation

I have an equation for which I would like to compute the Jacobian symbolically. $$f(x)=Ax-diag(x)(Ax+b)$$, where $x\in \mathbb{R}^n$, $A\in \mathbb{R}^{n\times n}$ and $b\in \mathbb{R}^n$. I am new ...
1
vote
1answer
120 views

Decomposing a diagonal positive real matrix

I would like to 'decompose' a diagonal positive real matrix $E$ of rank $D$ onto $\sum_{i=1}^{D}c(i)N^i$: $$E = \left( \begin{array}{ccc} 0 & & & \\ & a & & \\ ...
1
vote
1answer
89 views

Transform list of inequalities into matrix form $A\ x \leq b$

I have a list of linear inequalities, and I want to get it into the form $A\ x \leq b$; i.e., find the matrix $A$ and the vector $b$. Is there any function in Mathematica that can that can do this?
0
votes
0answers
187 views

Solving for equilibrium distribution (symbolic) by matrix multiplication

I have a huge transition matrix (81x81). The matrix is too huge to paste here, so I store it in this notebook. (There are constraints on the symbols: $0<p_b<1$ and $0<p_g<1$. If further ...
4
votes
3answers
244 views

Approximate minimum degree permutation algorithm in Mathematica

In MATLAB there is a nice implementation of the so called AMD (approximate minimum degree permutation) algorithm named amd (see Online MATLAB Documentation). There is an alternative algorithm called ...
0
votes
1answer
190 views

Performing matrix multiplications with a list

I have a question in regards to PseudoInverse. I have $A$, an $n\times 2$ matrix, and when I want to compute $(A^T A)^{-1}A$, by using ...
10
votes
3answers
411 views

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

Update  Multiple optimizations that were suggested by members "ssch" and Simon Woods have in aggregate yielded a ~5X code-speedup; and these optimizations now are incorporated in the example ...
0
votes
0answers
114 views

RowReduce : Record of all the row operations for RREF

I read "for what right-hand sides $b=(a,b,c)$ does $Ax=b$ have a solution", but that question pertains to solving for the unknown vector. I'd like a record of all of the row operations required to put ...
13
votes
1answer
415 views

Block Matrix Algebra with Mathematica

I have come up with some BlockMatrix Algebra for Mathematica to make notations easier. I have the following: ...
1
vote
1answer
206 views

General form of a linear transformation

Let $v_1 = \begin{bmatrix} 2 \\ -1 \end{bmatrix}$ and $v_2=\begin{bmatrix} 1 \\ -1 \end{bmatrix}$ and let $A= \begin{bmatrix} 3 & 2 \\ -2 & 1 \end{bmatrix}$ be a matrix for $T\colon \Bbb ...
0
votes
1answer
485 views

Best way to compute row eigenvectors

Without qualification, the term eigenvectors (of a matrix) refers to the column eigenvectors (of a matrix) and can be directly computed with Eigenvectors[]. To get ...
6
votes
1answer
216 views

Is matrix multiplication automatically done in parallel in Mathematica 9?

In good old Mathematica versions (5.2, 6.0), matrix multiplication was automatically done in parallel. For example, on an 8-core machine, define two square real matrices: ...
0
votes
1answer
62 views

Issues FindRootPlot command

I've had some fun playing around with FindRootPlot for a simple system of equations: ...
0
votes
0answers
99 views

Getting increased accuracy for roots of determinant

I have a matrix $a(\kappa)$ from which I am trying to determine $\kappa$ by using the equation $det(a(\kappa)) = 0$. The matrices I deal with are on the order of 100 X 100 to 500 X 500. Originally I ...
1
vote
2answers
199 views

Finding maximal sublist of linearly independent vectors

Given a list of vectors v = {v1, ..., vn}, which is the fastest way to find a maximal sublist of linearly independent vectors? I could add the vectors one by one to ...
2
votes
1answer
570 views

How to simplify symbolic matrix multiplication results?

I've defined three symbolic abstract matrices X, M and S as shown below. ...
0
votes
2answers
437 views

Classification of a linear system of equations with a parameter

I need to get every possible value of k that returns infinite number of solutions or no solution to this system: ...
6
votes
1answer
579 views

Fastest way to do vector / matrix multiplication with constant matrix

Suppose we have a fixed n x n matrix, call it $B$. What is fastest way to evaluate $v^t B\;v$ over many different vectors $v$? Since $B$ is a constant matrix, does this allow the number of operations ...
7
votes
5answers
185 views

Selecting terms from a matrix

There are similar questions to this on the forum but none fit the purpose here: I would like to extract certain elements of a matrix depending on whether a factor is present or not, and create ...
5
votes
2answers
258 views

Faster Eigenvalues with lower precision goal

I compute all eigenvalues of a large matrix, and I decide that the speed is more important than the precision. Then the question is, can I speed up Eigenvalues[] by ...
3
votes
1answer
294 views

How can I get Mathematica to recognize equality of symbolic matrix expressions?

I have two matrix expressions: X.Transpose[T].Transpose[X] and X.T.Transpose[X] I want Mathematica to recognize that ...
2
votes
1answer
204 views

How to obtain a Symplectic 4×4 matrix?

I have a problem in obtaining a $2n \times 2n$ Symplectic matrix $T$, with $n=2$. I couldn't find a direct command in Mathematica to achieve this. Conditions: ...
1
vote
1answer
163 views

Hermite Normal Form in “columns” convention

After describing the Hermite Normal Form (HNF), MathWorld explains: The Hermite normal form for integer matrices is implemented in Mathematica as ...
5
votes
6answers
656 views

A matrix-vector cross product

I want to do a cross product involving a vector of Pauli matrices $\vec \sigma = \left( {{\sigma _1},{\sigma _2},{\sigma _3}} \right)$; for example, $\vec \sigma \times \left( {1,2,3} \right)$. ...
3
votes
1answer
164 views

Exploiting self-adjointness when changing basis

I am using Mathematica to analyze a real, self-adjoint matrix $H$ of the size $32 \times 32$, which comes from a physics problem. In the picture there is also a matrix $Q$ which commutes with $H$. I ...
1
vote
1answer
174 views

Partial row reduction of a matrix

I have an $m\times n$ matrix (presumably of full rank) with $m>n$, and I would like to row reduce it, but leave the last column unreduced; that is, I want to get output on the form $\pmatrix{ 1 ...
5
votes
4answers
571 views

How to find the index of a square matrix in Mathematica quickly?

Let $A$ be an $n\times n$ complex matrix. The smallest nonnegative integer $k$ such that $\mathrm{rank}(A^{k+1})=\mathrm{rank}(A^{k})$, is the index fo $A$ and denoted by $\mathrm{Ind}(A)$. I would ...
0
votes
1answer
870 views

large matrix eigenvalue problem

I need solve a very large complex matrix (not sparse and not symmetry) eigenvalue problem, e.g., 1e4*1e4 or even 1e6*1e6. How large dimensions of the matrix can Mathematica support? And, how about ...
2
votes
0answers
151 views

Fast calculation of commute distances on large graphs (i.e. fast computation of the pseudo-inverse of a large Laplacian / Kirchhoff matrix)

I have a large, locally connected and undirected graph $G$ with $\approx 10^4$ vertices and $\approx 10^5$ to $\approx 10^6$ edges. Moreover I can bound the maximum vertex degree as $Q_{max}$. I ...
4
votes
3answers
583 views

Compute the rank of a matrix with variable entries

Say I have a matrix like $$ M=\left( \begin{array}{c c c} x & xz & w-2x \\ wz^3 & xy & z \\ y^2-z^3 & x+w & z+x^5 \end{array} \right) $$ is it possible to ask Mathematica ...
1
vote
2answers
447 views

Matrix echelon/upper diagonal form

Is there a way to find the echelon form of a matrix in Mathematica? I see there is a function to find the reduced echelon form, RowReduce[], but I can't see ...
1
vote
2answers
220 views

Computing distance matrix for a list

Using functional programming in Mathematica, how can I compute a distance matrix for every element in a list of matrices... The distance would be computed between the item in the list and a "target ...
1
vote
2answers
761 views

Efficient ways to create matrices and solve matrix equations

I am attempting, for the first time, to use Mathematica to do some serious linear algebra. I would like to solve systems of equations of the form $$U_{n n'} f_{n'} = b_n.$$ I have an expression for ...