Questions on the linear algebra functionality of Mathematica.

learn more… | top users | synonyms

0
votes
0answers
40 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: ...
-1
votes
0answers
50 views

How to generate all symmetric positive semidefinite 0,1 matrices of a given order [on hold]

The title says it all. There are many instances when we need to check some properties of such matrices. I am looking for an efficient code.
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
92 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
62 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 ...
0
votes
2answers
130 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
63 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 ...
6
votes
1answer
232 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 ...
1
vote
2answers
167 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 ...
7
votes
1answer
285 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 ...
10
votes
3answers
601 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 ...
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 ...
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 ...
0
votes
1answer
95 views

Why Eigenvalues thinks matrices are non-numerical

I use Mathematica version 9.0.1. ...
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, ...
4
votes
0answers
92 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 ...
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$ ...
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
177 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 ...
2
votes
2answers
206 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 ...
3
votes
1answer
190 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 ...
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?
0
votes
0answers
159 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
2answers
167 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 ...
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 ...
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
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 ...
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
364 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
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 ...
13
votes
1answer
314 views

Block Matrix Algebra with Mathematica

I have come up with some BlockMatrix Algebra for Mathematica to make notations easier. I have the following: ...
5
votes
1answer
146 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
140 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
289 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 ...
1
vote
1answer
176 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
235 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 ...
1
vote
1answer
172 views

Gram Schmidt inner and outer products

I know the Gram-Schmidt orthogonalization generates an orthonormal basis from an arbitrary basis. I need help with: Write a program that inputs a list $\{b_1,\dotsc,b_n\}$ of linearly independent ...
6
votes
1answer
184 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: ...
4
votes
1answer
136 views

Implementing Bilinear Products

Consider a real, vector space $V$ with basis $B=\{v_1,v_2,\dots\}$, and let $\star:V\times V\to\mathbb R$ be a bilinear product on $V$. I would like to implement this product in Mathematica by ...
0
votes
1answer
57 views

Issues FindRootPlot command

I've had some fun playing around with FindRootPlot for a simple system of equations: ...
5
votes
1answer
191 views

Symbolic linear algebra

I would like to know how I can ask Mathematica to expand (and simplify) such an expression : $$ (\alpha A + \beta B)^\top (\alpha A + \beta B) $$ where $\alpha,\beta$ are two real numbers and $A,B$ ...