Tagged Questions

Questions on the linear algebra functionality of Mathematica.

learn more… | top users | synonyms

2
votes
2answers
65 views

Find the indexes of dependent columns

I have a fairly large singular square matrix, of size 37 and rank 35. Is there a way to get a vector with the (groups of) indexes of the columns in the original matrix that are linearly dependent? ...
3
votes
1answer
79 views

Solving simultaneous systems of linear equations

I have several systems of linear equations in matrix form, and I would like to find the $\vec{x}$ that simultaneously solves them: $$A_1\vec{x} = b_1$$ $$\vdots$$ $$A_n\vec{x} = b_n$$ Is there a ...
0
votes
0answers
24 views

Can anyone help me deduce a matrix inequality? [on hold]

The following lemma is taken from references firstly. Lemma 1 [1-2] Given matrices $Q=Q^{T} , F, M$ and $N$ of appropriate dimensions, then $$Q+MFN+N^{T}F^{T}M^{T}<0$$ for all $F$ satisfying ...
1
vote
1answer
97 views

Why does LyapunovSolve solve non-standard form?

LyapunovSolve[A,Q] solves the equation $A P + P A^T = Q$ for $P$ whereas the standard form (wikipedia,lecture notes, p.25, linear control systems) of the Lyapunov ...
1
vote
2answers
65 views

How to extract matrix which produces given symbolic linear combinations?

Suppose I have a column matrix $\alpha$, consisting of some symbols ...
1
vote
1answer
33 views

Minimization problem in a subset of Complex matrices

I would like to minimize $||\mathbf{A} \rho -v||$ (where $\rho , v$ are fixed vectors) with respect to the matrix $\mathbf{A}$ elements, but with $\mathbf{A}$ in a subset of complex matrices (i.e. ...
5
votes
3answers
124 views

Missing control for depth of Inner

Working on a mechanics problem, I stumbled on something peculiar: Since Inner is a generalisation of Dot, it changes its ...
0
votes
0answers
35 views

Scalar multiplication [closed]

I define v = {a, b} I now want to scalar multiply the vector v by a scalar k. So I write kv The output I obtain is again ...
2
votes
1answer
29 views

Linear function on strings using UpValues

I have two functions Sup and Sdown that take a string of letters with allowed characters ...
1
vote
0answers
37 views

Symbolic Nullspace computation in parallel

I am trying to determine the nullspace of a large symbolic matrix. The single core evolution seems to take too long. I tried Parallelize[] on the commands ...
3
votes
1answer
60 views

Graphs Plotting Discontinuous

I'm trying to plot a graph from the eigenvalues of a matrix I created. The graph shows with discontinuities in it and I was looking for some feedback. Here's the code: ...
0
votes
1answer
58 views

How large can be the dimension of a complex matrix which Mathematica can handle to find its eigenalues?

I have been working with 12 cross 12 complex matrix in Mathematica , I need to work with bigger size matrix of the dimension of the order of hundreds , I was wondering if Mathematica can handle ...
0
votes
1answer
59 views

Submatrix with linearly independent columns

What I want is the submatrix where all the linearly dependent rows have been eliminated. I tried implementing this solution, but it doesn't work in the following example: ...
1
vote
1answer
112 views

Basis for the intersection of vector spaces

The MuPAD Notebook Interface provides the linalg::intBasis function: http://www.mathworks.com/help/symbolic/mupad_ref/linalg-intbasis.html How can I get the same ...
4
votes
3answers
100 views

A Product function for matrix products

I would like to use an equivalent of the product-function in mathematica, but where instead of multiplying numbers I multiply matrices?
0
votes
1answer
32 views

I need help simplifying this equation [closed]

1 = D / R Now I want to add a value to each side. U. Is it like this? 1 + U = D / R + U Then I need it simplified. Thanks
1
vote
2answers
50 views

Using conditionals to check if LinearSolve found a solution

Is there some way to check if LinearSolve found a solution using conditionals in Mathematica 9? I need to solve a large number of linear equations, but I am only interested in the cases where there ...
0
votes
1answer
54 views

How to tell Eigensystem the type of the elements comprising a matrix I would like to diagonalize

How can I tell Eigensystem that a matrix $M$, which I would like to diagonalize, is a numerical matrix of complex numbers? My idea is that this information could ...
1
vote
0answers
54 views

Request for clarification of Eigensystem::eivn message

What causes the problem of "two eigenvectors associated to one single multiplicity eigenvalue" that I am experiencing? After several transformations to simplify an unwieldy matrix, I end up with the ...
2
votes
1answer
111 views

Sort eigenvectors of a list of matrices

I have a list of matrices and want to obtain a list of eigenvectors and eigenvalues for each matrix, both sorted by the size of the eigenvalue. If I write ...
2
votes
2answers
109 views

What is the best way to write a polynomial in the Bernstein basis?

The Bernstein basis of polynomials of degree $n$ is the set of polynomials of the form $$\binom{n}{k} t^{n-k}(1-t)^k$$ where $0 \leq k \leq n$. What is the best way to transform a given polynomial ...
3
votes
1answer
79 views

Find the NullSpace of a matrix whose determinant is “almost” zero

If $A$ is a matrix such that $\det(A)=0$, it is easy to get a basis of the kernel of $A$ with NullSpace[A]. Now let's consider a matrix $B$, function of a ...
5
votes
0answers
143 views

Is it possible to implement symbolic sub matrices?

The accepted answer in the following link: http://stackoverflow.com/questions/5708208/symbolic-matrices-in-mathematica-with-unknown-dimensions provides a functionality to create symbolic matrices ...
13
votes
1answer
372 views

Morphological Filtering in 3D to produce skeletons

Context As a follow up of this question and that answer, I would like to identify the special lines separating 3D watersheds. These are useful in the context of astronomy to identify the ...
5
votes
3answers
131 views

Assuming reals of unknown variables in a Matrix valued function

I am trying to write a generic matrix valued function in a package, of the form: f[matrix_] := Module[...] My problem is that I want to accept any matrix, but ...
1
vote
1answer
102 views

Solving a System/Matrix of Equations in Matrix Form

Ok, I am trying to solve an equation involving matrices (well, tensors actually), which is of the form: $\mathbf{e}^{T} \cdot \mathbf{M} \cdot \mathbf{e}$ = $\mathbf{N}$, where $\mathbf{e}$ is an ...
0
votes
1answer
113 views

How smart is Solve? Figuring out what tricks I should try

I'm trying to solve a large system (~10000) of linear equations using Solve, but the process keeps failing. As-is, I don't know whether it's failing because it's using too much memory or too much time ...
1
vote
0answers
31 views

Symbolic computation under certain assumptions [duplicate]

Assume that I have a matrix $M$ and I'm doing some operations on it. Is there a way to specify that two variables satisfy an equation say $x=y^2$ and then let Mathematica compute under that ...
1
vote
0answers
47 views

Steps in row reduction? [closed]

I have a fully symbolic matrix that I'm row reducing. Looking at the end result, I see that Mathematica must have divided out some common factors for each row. However, I need to analyze those ...
2
votes
2answers
180 views

Intersection of two vector spaces

Is there a simple way without having to manually compute the matrices and do LinearSolve to do the following? Assume I'm given two lists $l_1$, $l_2$ of vectors of the same dimension. I want a list of ...
4
votes
1answer
150 views

Generating random symmetric matrix

Suppose first that I want to generate a matrix whose elements are i.i.d. with distribution dist. This is easy: ...
3
votes
1answer
107 views

Why does LinearSolve return the transpose of the answer matrix?

I am trying to solve an equation of the form $dv=F\cdot dV$ where $dv$ and $dV$ are matrices derived from the row vectors $dx$, $dy$, $dz$ and $dX$, $dY$, $dZ$ respectively. If it helps, $F$ is the ...
4
votes
2answers
296 views

Should eigenvalues be ordered?

When I run Eigensystem on a symmetric matrix, the list of eigenvalues (and so, the corresponding eigenvectors) is ordered by absolute values, which is quite bizarre (it does make sense if you view the ...
3
votes
0answers
74 views

Fast principal component analysis

I'd like to speed up a principal value value analysis. The data contains a large set of vectors with a large dimension. Both are in the range of 1000. I want to obtain the loadings matrix for further ...
3
votes
1answer
163 views
3
votes
1answer
53 views

How to pick out terms in a linear equation with a positive coefficient?

Basically I have a really large output which looks like a long linear equation $AAA-BAA-CAA+DAA+...-ZZZ$ And I only am concerned about those terms that have a positive coefficient (i.e. a plus in ...
-2
votes
1answer
72 views

$SU(4)$ Structure constants in mathematica

How can I write a mathematica function which will output arbitrary structure constants of SU(4)?
2
votes
0answers
86 views

How to make Eigensystem in version 10 produce the same results as version 9 [duplicate]

The Eigensystem in version 10 seems to give slightly different results as in version 9: ...
0
votes
0answers
48 views

How to solve equations over polynomial rings

sorry if my question is very basic but I don't know what to even search to look it up and the only "obvious" places I thought of had nothing. Some background, for whatever context it might provide. ...
6
votes
2answers
319 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 ...
1
vote
1answer
161 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
118 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
101 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 ...
7
votes
1answer
225 views

How get eigenvectors without phase jump?

I'm using Eigenvectors to get the eigenvectors for some matrixes, but the eigenvectors seems to have some phase jump. Here is an example: Say we have a 2 by 2 ...
0
votes
1answer
59 views

Any command for group products?

Is there any Mathematica command or well known technique to take the direct product between two symmetric/permutation groups?
0
votes
1answer
100 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 ...
2
votes
1answer
100 views

how to find iso-cost contours on a 2d plot efficiently

Consider a 2D plot in which dimension 1 and 2 represent quantity 1 and 2 respectively ranging over 0 to 100. Each point in the space corresponding to (x,y) represent cost of choosing quantity 1 as x ...
0
votes
1answer
131 views

Differences between 'Solve' and 'LinearSolve' [closed]

Using the function 'Solve' I can do the following: Solve[a x + y == 7 && b x - y == 1, {x, y}] I get the following output: I want to get the same output using 'LinearSolve' instead. How ...
3
votes
1answer
158 views

Control over the way matrix is displayed

I am wondering how to change the output format in Mathematica. For example, I have $x=\binom{3}{1}$ and $y=\binom{2}{5}$, and I want to find what linear combination of $x$ and $y$ produces ...