Questions on the linear algebra functionality of Mathematica.

learn more… | top users | synonyms

0
votes
1answer
176 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 ...
0
votes
0answers
13 views

how to find find a matrix by the characteristic vlaues and vectors [migrated]

Now I am studying linear algebra course, In that for a given matrix we are finding the characteristic values (eigen values) and characteristic vectors (eigen vectors). But my question is why cant we ...
1
vote
0answers
23 views

(Counting problem) very interesting Modular N algebraic eqs - for combinatorics experts [migrated]

We have some attempt to numerically solve this math problem, which means that we like to count the number of independent solutions of this set of six of modular N algebraic equations: $$ (1) x_1 ...
0
votes
0answers
6 views

T is an operator on inner space, how to prove T is invertible if and only if T* is invertible? [migrated]

T is an operator on an inner product space, how to prove T is invertible if and only if T* is invertible? Can I change the target to prove T is injective iff T* is injective?
0
votes
0answers
21 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
91 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
74 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
61 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 ...
3
votes
3answers
200 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
2answers
118 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
62 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 ...
1
vote
2answers
164 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 ...
6
votes
1answer
229 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 ...
7
votes
1answer
284 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
44 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 ...
13
votes
1answer
313 views

Block Matrix Algebra with Mathematica

I have come up with some BlockMatrix Algebra for Mathematica to make notations easier. I have the following: ...
10
votes
3answers
599 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 ...
2
votes
2answers
203 views

How to plot several functions without jumping? (multiple eigenvalues of a system as functions of 2 parameters)

I've been working on this research problem for months with some success by no global/proper solution to the problem. So I have square, Hermitian matrices of various sizes ($8,20,38$ dimensions) with ...
0
votes
0answers
55 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
109 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
67 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 ...
0
votes
1answer
95 views

Why Eigenvalues thinks matrices are non-numerical

I use Mathematica version 9.0.1. ...
1
vote
1answer
76 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 ...
7
votes
3answers
991 views

Discrete Convolution

Ask to compute the convolution of 2 lists, I managed to do so, with what I feel is rather heavy : Let my 2 lists be : a = {1,2,3,4} b = {1,1,1,1,1,1}; The below function adds 0s on each part of ...
1
vote
1answer
60 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, ...
2
votes
2answers
89 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$ ...
4
votes
0answers
89 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 ...
4
votes
2answers
209 views

Computing the sign of the real part of eigenvalues in a 3D linearized system with 3 parameters

So I have this dynamical system given by: $$ \left\{\begin{aligned} x' &= a(y-\phi(x))\\ y' &= x-y+z\\ z' &= -by \end{aligned}\right. $$ where $\phi(x) = \mu x^3 - \nu x$ and $a,b,\mu,\nu$ ...
0
votes
1answer
65 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
50 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: ...
0
votes
1answer
125 views

Is it in general faster to get the eigenvectors and eigenvalues of a dense array rather than a sparse array?

I always thought that things in general go faster when working with sparse array but, I got this: Eigenvalues::arhm: Because finding 144 out of the 144 ...
3
votes
1answer
186 views

Specific Mathematica algorithms, for example LU Decomposition

Where I can find detailed information on algorithms used by Mathematica, especially for numerical methods. The Manual doesn't seem to iclude specifics in most cases. For example I get a different LU ...
0
votes
0answers
158 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 ...
1
vote
1answer
108 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
75 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?
1
vote
1answer
175 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 ...
1
vote
2answers
166 views

What's the best way to generate all the upper triangular matrix whose singular values are given?

For example, given $\lambda_1 = 1, \lambda_2 = 2, \lambda_3 = 3$, what's the best way to generate all the upper triangular matrix ($3\times 3$) whose singular values are $\lambda_i$? Note:Given a ...
0
votes
1answer
168 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 ...
1
vote
1answer
86 views

Linearity of a function in Mathematica

I have a function which has something like myFunc[q,a state[c,d]] a could be anything, and I want to tell Mathematica that ...
0
votes
1answer
67 views

How to find coordinates of an abstract vector relative to a basis

Let's say I have a degree 3 homogeneous polynomial over variables $x0, x1, x2.$ There are then 10 distinct monic monomials, forming a basis of the vector space of polynomials of degree 3. If I have ...
9
votes
3answers
363 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 ...
2
votes
1answer
321 views

RowReduce: Solving for the resource vector (a, b, c) in Augmented Matrix

Here are two examples: RowReduce[{{3, 1, a}, {2, 1, b}}] evaluates to {{1, 0, a - b}, {0, 1, -2 a + 3 b}} but ...
0
votes
0answers
78 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 ...
5
votes
1answer
145 views

Computations in the exterior algebra

I want to be able to compute with explicit exterior algebras of vector spaces. For example, given a real vector space $V$ of $3 \times 3$ matrices, I want to consider expressions of the form $v\wedge ...
7
votes
1answer
139 views

Is it possible to get the transformation PrincipalComponents uses to transform data?

As far as I can see PrincipalComponents[data] just gives data in the principal component basis. The problem is that after this, I would like to transform new data ...
3
votes
2answers
287 views

How to solve a “tensor equation”?

I am trying to solve equations which looks like this: $$ T_{ab} - T_{bc} = a_1 T_{ab} + a_2 T_{ac} + a_3 T_{bc}, $$ where $T_{xy}$ are tensors. I want to get the $a_i$'s (in this simple example ...
7
votes
3answers
456 views

Composition of functions

I have a number of rotations computed by rot = RotationTransform[theta, point], and I would like to compose them to produce one function that is the composition of ...
0
votes
1answer
231 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 ...
5
votes
1answer
712 views

Solving a system of linear equations modulo n

I have a system of linear equations $$ a+b+c \equiv 31 \pmod{54} $$ $$ 4a+2b+c \equiv 3 \pmod{54} $$ $$ 9a+3b+c \equiv 11 \pmod{54} $$ What should I input (I'm using ...
9
votes
4answers
684 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 ...