Questions about Mathematica functionality related to manipulating vector spaces and linear mappings between such spaces. This includes determination of matrix properties, matrix transformations, decompositions, and factoring.

learn more… | top users | synonyms

6
votes
3answers
1k 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 ...
8
votes
4answers
604 views

Verify Cayley-Hamilton Theorem

Consider the matrix: A = {{-1, -4, -2}, {0, 1, 1}, {-6, -12, 2}} Now, the characteristic polynomial is found: ...
1
vote
2answers
118 views

Are variables always assumed to be real in Jordan Decomposition?

If you give the following input in Mathematica 9.0 (Student Edition): JordanDecomposition /@ ({{1, #}, {#, -1}} & /@ {i, I}) Mathematica gives you two ...
1
vote
2answers
325 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 ...
4
votes
1answer
281 views

Polar Decomposition

I'm new to Mathematica 10 (half-a-month user). I'm looking for a function of polar decomposition but for now I cannot find it. Can anyone tell me about related functions. Thanks in advance.
1
vote
0answers
70 views

Mathematica program for PLUR decomposition of a symbolic matrix using full pivoting

I wanted to ask if there is a Mathematica program for PLUR decomposition of a symbolic matrix M, such that M = P*L*U*R, using FULL (row and column) pivoting, and where R = reduced row echelon form of ...
0
votes
1answer
91 views

Mathematica Lattice Reduce Command

I'm going through a very old copy of "Mathematica: A System for Doing Mathematics by Computer" for self practice. I'm on chapter 3, and ran into the LatticeReduce ...
6
votes
2answers
170 views

$\mathbf L\mathbf D\mathbf L^\top$ Cholesky decomposition

Mathematica can do a Cholesky decomposition $\mathbf A = \mathbf L\mathbf L^\top$, but how do I do a LDL decomposition $\mathbf A = \mathbf L\mathbf D\mathbf L^\top$, with $\mathbf L$ being a unit ...
0
votes
1answer
44 views

Invoking WorkingPrecision slows down Eigenvalue calculation drastically?

Normally, obtaining eigenvalues of random numerical matrices is fast. For instance a generic result looks like ...
2
votes
2answers
266 views

Logarithm of a matrix in base 2?

Mathematica provides the built-in command MatrixLog, which operates on a square nonsingular matrix, but it returns the natural logarithm. How can I find the base 2 ...
8
votes
2answers
180 views

Analytic determinant of a sparse 25x25 matrix?

I would like to compute the analytic determinant of the following sparse matrix ...
1
vote
0answers
102 views

How to find matrix exponential using RootSum? [duplicate]

From what I've been able to deduce, Mathematica uses a root sum scheme to determine the exponential of a matrix. Can someone please explain to me the theory behind this? I've searched, but have had no ...
19
votes
5answers
781 views

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

Update III  Mathematica 10.2.0 now ships with a predefined System`Permanent function, which the PermanentCode package ...
6
votes
2answers
264 views

Matrix exponential via Cayley-Hamilton Theorem

I'm attempting to calculate the exponential of a matrix via Cayley-Hamilton theorem. (Following the "concrete example" from http://en.wikipedia.org/wiki/Cayley%E2%80%93Hamilton_theorem) I am having ...
1
vote
1answer
66 views

How to rearrange CharacteristicPolynomial[ ] terms?

I have a symbolic matrix A, which I need to find the characteristic polynomial, then order the polynomial in greatest-to-least form. (Ultimately to find the matrix inversion via Cayley-Hamilton ...
1
vote
0answers
31 views

Linear Programming Using Dual Simplex method

I want to solve an optimization problem using the Dual Simplex Method. Although Mathematica gives the result directly when I use the command Minimize but I want to ...
0
votes
2answers
57 views

LUDecomposition for non-square matrices

How do we go about finding the LUDecomposition for non-square matrices. When i try to input the standard LUDecomposition ...
2
votes
0answers
45 views

Explicitly find a guaranteed factorization of large expression?

Consider the large expression LE defined in this file (involving only linearly independent functions), or in this file (linear interdependence present but slightly ...
15
votes
3answers
465 views

Compiling LinearSolve[] or creating a compilable procedural version of it

Earlier today I had a discussion with a representative at Premier Support about the 2 questions I've asked here over the past couple of days: Seeking strategies to deploy a function securely ...
1
vote
0answers
93 views

Mathematica Numeric Output [closed]

I'm using Mathematica to compute barycentric coordinates, and the output for my points is not being computed, but rather it just shows it in the form that I inputted as. For example, I have: ...
10
votes
1answer
323 views

Is it possible to implement symbolic sub matrices?

The accepted answer in the question Symbolic matrices in Mathematica with unknown dimensions provides a functionality to create symbolic matrices which behave pretty much as the name suggests. ...
0
votes
2answers
152 views

Block matrix definition and inversion

I would like to define the following block matrix $$ A=\begin{bmatrix} H-G_1 & -G_1 & \ldots & -G_1 \\ -G_2 & H-G_2 & \ldots & -G_2 \\ \vdots & \ldots & \vdots & ...
11
votes
1answer
117 views

Nearest Kronecker Product

Some people (see The ubiquitous Kronecker product by Van Loan) have worked on finding two matrices $\mathbf A$,$\mathbf B$ of specified size whose tensor product $\mathbf A\otimes\mathbf B$ is closest ...
1
vote
2answers
141 views

Solve a symbolic underdetermined Linear System

Dear StackExchange Community, I'm trying to solve an indeterminate linear system of equations, with $n+1$ variables and $n$ equations; therefore, I need to express all $n$ other variables a function ...
5
votes
3answers
181 views

How to simplify symbolic expressions with KroneckerProduct

Having $X,Y$ being symbols for matrices, I was wondering if there is a way to simplify expressions like KroneckerProduct[X, X] + KroneckerProduct[-X, X] to ...
2
votes
1answer
105 views

Solve overdetermined set using Mathematica?

As shown below, this is a overdetermined system. Could you teach me how to find the optimized solution in Mathematica? I know it could be solved by the method of least square, but how to realize it in ...
0
votes
0answers
3 views

orthogonal vector from a vector and a matrix [migrated]

I have a vector $V1$, another vector $V2$, and a Matrix $M$, if I want $V2$ to be orthogonal to $V1$ I have to use Gram-Schmidt $$V2'=V2-\frac{V1.V2}{V1.V1}*V1$$ if I want V2 to be M-Orthogonal to V1 ...
0
votes
1answer
84 views

Orthogonalization is not commutative!

I get stuck into a problem: I am going to produce orthogonalized eigenvectors of a matrix and in any iteration. I shortened my question in the bellow line: Why do we face to different results of ...
3
votes
1answer
71 views

Easy way to solve a matrix equation for a matrix?

I have two sets of $10\times 10$ matrices $M1,M2,M3,M4,M5$ and $N1,N2,N3,N4,N5$ and I want to solve a set of equations for these matrices ...
6
votes
0answers
64 views

Choosing appropriate WorkingPrecision when solving numerical system of equations

Consider a linear system of equations, which is conveniently written as A.x=y. The matrix A has dimensions ...
2
votes
0answers
74 views

Suggestions for solving a large linear system

I have a system of $\approx 200,000$ linear equations in $\approx 40,000$ variables (with rational coefficients) and I would like to determine the dimension of the solution space, which I know to be ...
5
votes
0answers
41 views

Mathematica package for explicit matrix representations of group generators?

While there are several packages that are capable of working with weights and roots (for example LieArt), I couldn't find any package that spits out explicit matrices for the generators, for example ...
1
vote
0answers
105 views

MatrixExp of a complex matrix of size about 10000 by 10000 [closed]

I want to apply MatrixExp of a numerical, complex matrix of size about 10000 by 10000, and I also need high precision as I need to multiply several such matrices. ...
8
votes
2answers
139 views

Difficulty using LUDecomposition

I'm having trouble using LUDecomposition with pivoting. I read the Mathematica help on this particular command, but I'm still lost. Take a matrix like: ...
0
votes
1answer
357 views

Mathematica Implementation of Householder’s Method

I typed the Householder code in this paper, which starts on page 7. The code is: ...
7
votes
2answers
176 views

Why is mathematica eating a row from QRDecompostion

I'm attempting to calculate the QRDecomposition of the matrix: a= {{1,3},{0,5},{2,-8}} QRDecomposition [a] The answer mathematica gives me is: - Q which is a ...
2
votes
0answers
57 views
6
votes
0answers
279 views

NullSpace[_, Method->“OneStepRowReduction”] is sometimes wrong; how can I work out when this happens?

Edit 2015: Has this been fixed yet? (This is on MMA 7.0.1.0 on OS X) I've just found a large matrix m for which NullSpace[m] ...
4
votes
2answers
50 views

Inputting values into the variables without having to input the matrix all over again

I'm practicing using LU decomposition on Mathematica. I am able to find the L & U matrices, specifically the variables. However, i find it tedious having to input the newly found values and form ...
14
votes
1answer
445 views

How to determine BLAS/LAPACK implementation used internally for numerical matrix operations?

Is there a command which reveals which implementation of BLAS and LAPACK are used in Mathematica's matrix operations such as Eigensystem? I asked a related question ...
7
votes
2answers
2k views

Gram-Schmidt Process for Polynomials

I want to implement the Gram Schimdt procedure to the vector space of polynomials of degree up to 5, i.e. I want to find an orthogonal basis from the set of vectors $v=(1,x,x^2,x^3,x^4,x^5)$. The ...
9
votes
3answers
1k views

Has Mathematica a function to compute the Smith Normal Form?

The Smith normal form is a matrix that can be calculated for any matrix (not necessarily square) with integer entries. See Wikipedia for a more elaborate description. Has Mathematica a function to ...
5
votes
1answer
589 views

Matrix Rational Canonical Form

Is there a way to calculate the Rational Canonical Form of an $n\times n$ integer matrix using Mathematica? I have been perusing the documentation and web, but nothing so far.
0
votes
0answers
143 views

Mathematica function Det has unexpected behavior

I am using Mathematica "Kernel" -> {"Version" -> "9.0 for Microsoft Windows (64-bit) (January 25, 2013)", "ReleaseID" -> "9.0.1.0 (4055652, 4055188)" on a Win 7 machine. The file listed below uses ...
6
votes
1answer
423 views

Is there no documentation for Method in Eigensystem?

There does not appear to be any documentation on how to use Method in Eigensystem, or at least not in Version 9.0.1 of ...
6
votes
2answers
193 views

Can't find the eigenvectors of a simple 2x2 matrix

Bug introduced in 8.0 or earlier and persisting through 10.2.0 Why can't Mathematica find the eigenvectors of this matrix? ...
6
votes
2answers
316 views

Given a set of four linearly independent vectors, how can I compute two additional linearly independent vectors?

I have four linearly independent vectors: $$ \left( \begin{array}{c} \left\{\frac{1}{2},\frac{1}{2},0,0,0,0\right\} \\ \end{array} \right)$$ $$ \left( \begin{array}{c} \left\{\frac{1}{2 ...
2
votes
0answers
50 views

Parallel evaluation of symbolic matrix eigenvalues

I'm trying to find eigenvalues of symbolic hermitian 40x40 block matrix. It is made from 20 2x2 matrices like this: ArrayFlatten[Table[M[m,n],{m,1,20},{n,1,20}]] ...