Questions on the linear algebra functionality of Mathematica.
3
votes
2answers
450 views
Linear equation with complex numbers
I have to solve an equation of the type $$a z+b \overline{z}=c$$ with $a,b,c\in\mathbb{C}$.
My approach is to set $F(z)=a z+b \overline{z}-c$ transform $z$ to $x+i y$ and then get a real linear ...
1
vote
1answer
108 views
RowReduce Problem
Here are two examples:
RowReduce[{{3, 1, a}, {2, 1, b}}]
evaluates to
{{1, 0, a - b}, {0, 1, -2 a + 3 b}}
but
...
1
vote
1answer
126 views
Functions that operate on symbolic matrices?
I'd like to write functions that operate on symbolic matrices, and do nothing when fed anything else.
...
8
votes
1answer
158 views
Verifying and deriving basic (block) matrix identities
How can I use the new symbolic matrix/tensor capabilities to verify matrix identities, such as
(1)
or
(2)
Even better, how can I ask Mathematica to derive expressions for X, Y, Z, and U like ...
20
votes
3answers
1k views
Can Mathematica do symbolic linear algebra?
For instance, is there some way I can say "let A and B be arbitrary real $m\times n$ and $k\times m$ matrices, Simplify[Transpose[Transpose[A].Transpose[B]]]" and ...
6
votes
1answer
109 views
LinearSolveFunction unusable if stored to disk?
I encounter a problem when saving a LinearSolveFunction to disk, where the LinearSolveFunction is obtained with LinearSolve for ...
10
votes
2answers
264 views
Is there any way to obtain an approximate inverse for very large sparse matrices?
I have a very large sparse matrix and I need to obtain its approximate inverse and save it as an sparse matrix too. Any of my efforts as could be seen in what follows fail for large n
...
1
vote
0answers
133 views
Parallel linear algebra with arbitrary precision
Is it possible to do parallel linear algebra with arbitrary precision within Mathematica (in a simple manner, as is done for the machine precision)?
2
votes
2answers
304 views
Eigensystem, Eigenvalue doesn't output nonreal eigenvalues
Basically I have a matrix and when I used either Eigenvalue or Eigensystem, it doesn't output nonreal eigenvalues, instead it ...
2
votes
1answer
199 views
9
votes
4answers
355 views
Dual-Grid Graph Paper With Mathematica?
Is there a slick way to generate the dual-grid graphs such as you can see on pages 7, 9, and 10 of this article, or this one?
I've searched, but found nothing. Thanks in advance...
0
votes
1answer
133 views
Rearranging a biclustered matrix
I currently have a $77\times 38$ matrix, and I have used a clustering algorithm to cluster the row data and column data. The rows and columns of my matrix correspond to a list of country codes (not in ...
2
votes
3answers
167 views
Adding elements in the sublists
How can I add the elements in the sublists?
For example, if I have the list which is
m={{1,3},{2,3},{4,1}}
then, the output that I want is ...
3
votes
2answers
149 views
Deleting a row or column of an adjacency matrix while maintaining the associated label
I am currently working with a weighted adjacency matrix for a directed graph, and it contains several 0 columns and rows. With the unaltered matrix, I am able to monitor the relations between vertices ...
4
votes
2answers
251 views
Can the CholeskyDecomposition function in Mathematica be made to work on non-symmetric matrices?
The CholeskyDecomposition[m] function in Mathematica requires a symmetric and positive definite matrix m.
For instance, the ...
1
vote
1answer
174 views
Using singular value decomposition for graph clustering
I have a fairly large graph (50-60 vertices) with directed, weighted edges, and I am attempting to cluster the vertices. Prior to this, I have only worked with undirected graphs having symmetric ...
1
vote
1answer
303 views
Calculating an exact orthogonal modal matrix in Mathematica
I can calculate the modal matrix of a matrix A using the command JordanDecomposition[A][[1]], and a decimal approximation of the orthogonal (or normalised) modal ...
4
votes
2answers
301 views
How to solve an eigensystem faster?
I have a module that I need to call 1-10 million times in my program. Currently, it is taking several hours to run so I am hoping that I can cut down some runtime with your help.
...
3
votes
2answers
307 views
Subspaces in Mathematica
I'm working on a research project and I need to learn how to use Mathematica to calculate subspaces. Specifically I plan to solve the following operations and I would greatly appreciate if you could ...
2
votes
2answers
286 views
Generating a vector of dummy variables
So I'm the situation of needing analytical solutions to a family of equations of the form Ax=b, where A is an nxn matrix. I've written a function that does what I want, but I'm currently using a bit ...
5
votes
2answers
798 views
Eigenvalue / Eigenvector Calculation
I'm currently trying to compute the three smallest eigenvectors for a 34 by 34 matrix. While I was expecting this to take some time, Mathematica has been running for the past 3 hours, which seems ...
4
votes
1answer
439 views
Mathematica won't give eigenvectors but Wolfram Alpha will? What am I doing wrong?
If I ask Mathematica to find the eigenvectors and eigenvalues of the matrix:
...
7
votes
3answers
324 views
Determine if solution to linear system exists
I'm trying to determine only if a solution to a linear system of equations exists. I have been using LinearSolve, which works fine, but it solves the system as ...
9
votes
3answers
206 views
Toggle visibility of elements in a plot
I have three simple graphs in one Plot. Now I am trying to make a button for each graph so you can hide or show it in the plot. Until now I was just able to make a checkbox with the Manipulate ...
2
votes
3answers
408 views
Finding eigenvalues of a $1500\times1500$ matrix
I need to find the eigenvalues of a $1500\times1500$ real symmetric matrix given by $A_{i,i+1}= A_{i+1,i}=-1$ and also $A_{1,N=1500}=-1$ (this is because of a periodic boundary condition used) and all ...
10
votes
2answers
189 views
How can I compute the representation matrices of a point group under given basis functions?
Take the $C_{3v}$ point group for example:
...
14
votes
3answers
648 views
Mathematica for linear algebra course?
I'm taking a linear algebra / matrix theory course and we are free to use any software we want, and will be "expected to use MATLAB or an equivalent" for homework. The professor and textbook (Applied ...
1
vote
1answer
301 views
Is Mathematica matrix multiplication with its inverse wrong? [duplicate]
Possible Duplicate:
Why don't * and ^ work as I expected on matrices?
When I enter this
...
1
vote
2answers
292 views
How to Solve or LinearSolve $A = I$ matrix equation?
I'd like to solve this equation for $A = B$ where $B = I$, which represents 3 systems of 3 linear equations, for $a, b, c, d, e, f$, without writing LinearSolve 3 ...
3
votes
4answers
121 views
Pack Solve results into a vector
I am currently using a really easy function to get the eigenvectors of a corresponding eigenspace:
...
9
votes
3answers
516 views
Correcting a correlation matrix to be positive semidefinite
Does Mathematica have a way to "fix" a correlation matrix that is not positive semi-definite?
I looked through the documentation and search the internet but could not find anything.
21
votes
3answers
373 views
Computing polynomial eigenvalues in Mathematica
MATLAB offers a function polyeig for computing polynomial eigenvalues, which appear, for instance in quadratic eigenvalue problems (see here for some applications) such as:
\begin{equation}
...
7
votes
1answer
224 views
Efficiently Constructing Rank One Approximations for a Matrix using SVD
Suppose I have a $m\times n$ matrix $A$ (real for simplicity). Then SingularValueDecomposition[A] yields 3 matrices $U$, $\Sigma$ and $V$ such that
$A = U\Sigma ...
12
votes
1answer
318 views
Is there a clean way to extract the subspaces invariant under a list of matrices?
Let's say I have some $n \times n$ square matrices $A_1, A_2, \ldots, A_m$ with exact numbers for entries, and I want to find the subspaces of $V = \mathbb{C}^n$ invariant under these matrices. Is ...
3
votes
0answers
122 views
LeastSquare Solution for the Continuous Time Lyapunov Equation
I have been working with a problem which involves solving the continuous time Lyapunov equation
$$A R + R A^\top = G$$
for the symmetric positive definite matrix $R$. Here $A$ is real, invertible ...
7
votes
1answer
251 views
Very fast way to do a coordinate frame transform
I need a function that rotates and translates a huge amount of line segments.
For example, I have a set of line segments in the form {{x0,y0,z0},{x1,y1,z1}}
...
0
votes
1answer
538 views
Solve matrix equation A*X=X*B using LeastSquares
I want to solve matrix equation A*X=X*B using LeastSquares method, but it is suited for equation like A*X=B.
All matrices are 3x3
...
0
votes
1answer
263 views
If I know the steady state vector of a stochastic matrix, can i recover the matrix? [closed]
By steady state vector I mean the eigenvector which has an eigenvalue of 1. So is there a way to at least iteratively approximate the entries of the stochastic matrix?
Thanks.
6
votes
1answer
344 views
Finding the characteristic polynomial of a matrix modulus n
Given a square matrix, is it possible to calculate its characteristic polynomial modulo n?
Unfortunately, this function ...
2
votes
2answers
535 views
Matrix multiplication in Block Form symbolic calculation by Mathematica
I have a problem which requires taking product of two $10\times10$ matrices. I would like to do it by considering both matrices as $5\times5$ matrices such that each entry of both matrices is actually ...
9
votes
2answers
594 views
Find Determinant/or Row Reduce parameter dependent matrix
I'm trying to find the determinant of a band diagonal matrix that has a parameter, $\kappa$, in some of the entries. Some entries are just numerical ones, others ($\kappa$ X number), while others are ...
12
votes
4answers
308 views
How do you decompose a polynomial matrix into its matrix coefficients?
Let's say I have a matrix, $\mathbf{M}$, that is polynomially dependent on a single variable, such as
M = {{15 + a^2, a + 5 a^2}, {a - 5 a^2, 2}}
and I want to ...
13
votes
3answers
437 views
Constructing a symbolic Hermitian matrix
I need to construct a symbolic Hermitian matrix like
m = {
{ n, a, b, b},
{Conjugate[a], n, b, b},
...
}
but I am not able to set ...
4
votes
1answer
354 views
Computing Slater determinants
I need to compute Slater determinants. I'm wondering if I would benefit from assigning each of my functions to a variable prior to computation. I'm working with Slater determinants, but my question ...
6
votes
1answer
279 views
Tridiagonal symmetric matrix eigenvalue using bisection
I know that Eigenvalues is already quite well implemented in Mathematica, nor am I foolishly trying to improve on it. In order to improve my programming skills, I ...
5
votes
3answers
481 views
Solution for equation system with piece-wise defined functions
As I could swear this worked just yesterday, I am probably just doing something stupid here and I am sorry to bother you :)
I am trying to find the point where a curve crosses a line. In this case, ...
3
votes
2answers
569 views
How to substitute numeric values in a symbolic Jacobian matrix?
I have a multi-variate function from $\mathbb{R}^n\to\mathbb{R}^n$. Choosing any desired initial vector, we can produce the corresponding function value, which is a vector as follows. The main problem ...
11
votes
1answer
316 views
Space-efficient null space of sparse array
I have a roughly 100,000 × 3,000 matrix (as a SparseArray) that I'd like to find the kernel (null space) of.
It has about 500,000 nonzero entries, all -1 or 1.
...
7
votes
0answers
169 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.
...
10
votes
1answer
215 views
Memory Leak in RowReduce?
Recently I tried to do what I thought was a fairly small (relative to the 6 GB of RAM that I have on my machine) row reduction calculation on a matrix representing an undetermined linear system and ...



