# Questions tagged [linear-algebra]

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.

168 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
931 views

### LinearSolve and Krylov Method options

I need to solve a large, sparse, linear system. At some point Method -> "Multifrontal" fails and a bit later also "Pardiso" ...
382 views

### Factorize trigonometric matrices

Consider two square matrices $A_1$ and $A_2$. Consider the following matrix involving matrix trigonometric functions: \begin{equation} M_1(t)=\begin{bmatrix} \cos(tA_1) & t\mathrm{sinc}(t A_1) \\ ...
802 views

### What algorithm is Mathematica using to find the smallest eigenvalue so quickly?

My question is what kind of black magic is Mathematica doing to obtain the correct answer so quickly compared to other programming languages? Details: I've written a Mathematica notebook to find the ...
533 views

### How to speed up calculations on big symbolic matrices?

this is my first time posting something on a community of the StackExchange platform, so please feel free to correct me if I'm doing something wrong. :) Additionally you should probably know that I'm ...
279 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 ...
165 views

### Matrix-free Arnoldi method for eigensystems

I am solving a generalized eigenvalue problem $$\mathbf S\,\mathbf x = \lambda\,\mathbf M\,\mathbf x$$ w/ $\mathbf S := \mathbf B\,\mathbf A^{-1}\,\mathbf B^{T}$, and $\mathbf A$ is a sparse ...
197 views

### Bug in PositiveDefiniteMatrixQ?

Fixed in 10.1.0. Exists in at least 9.0.1 -- 10.0.2. This seems like a bug in PositiveDefiniteMatrixQ to me: ...
173 views

### Why has Version 10.3 precision reduced?

In version 7.0.1.0 and versions 10.0 and 10.1 the following is produced: ...
109 views

### Differing behavior of Eigenvalues and Eigensystem

With the update to v12.0, I seem to be getting different behavior of eigenvalues returned by Eigenvalues and Eigensystem (oddly, ...
88 views

### Computing log-determinant?

Mathematica does-not have a function to compute the log-det of matrix? Naively computing Log[Det[M]] can be numerically unstable.
343 views

896 views

### How to determined intel MKL library version used by current Mathematica?

In Matlab, I can determined which intel MKL is used using a command such as this: >> version -lapack Intel(R) Math Kernel Library Version 11.2.3 Product ...
131 views

### MatrixPower performance

In Mathematica 9, (I think) MatrixPower[matrix(m.m), n].vector has complexity $O(m^{2+\epsilon}\times\log(n))$ (Mathematica automatically find the algorithm that ...
2k views

### Solve huge symbolic system of linear equations

I have a system of 76 symbolic linear equations (i.e. some coefficients are symbolic) with a sparse coefficient matrix. However, neither Solve[] nor ...
103 views

### Arbitrary Precision, Nearly-Singular Matrices, and LinearSolve

I have been trying to solve a nonlinear eigenvalue problem, $\mathbf{M}(\lambda) \mathbf{v} = 0$, in Mathematica using Newton's method. The core of the algorithm relies upon an inverse iteration, ...
78 views

### Bug for Cubics -> True in Eigenvalues?

Let's consider the simple code ...
368 views

### Documentation for LinearAlgebraLAPACK?

Does anybody use the functions provided in the context LinearAlgebra`LAPACK directly? Is there any documentation out there? Guessing the argument patterns for these function by trial and error is ...
123 views

### Is it possible to speedup these simple linear algebra operations

I'm trying to numerically solve some equations using splitting operator method. The solver I construct iteratively constructs a matrix and feeds it to LinearSolve. ...
352 views

### Change of basis of polynomials

Suppose I have a favourite basis for polynomials in $x_1,\dotsc,x_n$, say non-symmetric Macdonald polynomials to be specific. I can easily compute these, and thus the change-of-basis matrix that takes ...
363 views

### Eigenvalues FEAST method - performance is very variable

I am running the FEAST method option for Eigenvalues on sparse matrices of dimension around 500,000. I look for about 50 ...
503 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 ...
988 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 ...
327 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 ...
99 views

### Converting complex equations to matrix form

My question is a continuation of the topic: How to convert equation to vector (matrix) form? It is necessary to separate the components of equations into vectors and matrices and a combination of ...
142 views

### Speed improvements and confusion for MapThread and Dot

I have a question / confusion over improving the speed of MapThread[Dot,...] for lists of tensors. My problem involves taking two lists of tensors and then ...
147 views

### Orthogonal matrix decomposition of symmetric matrix?

If matrix mat is symmetric, we should be able to decompose it into eigenvalue matrix matJ and orthogonal matrix ...
852 views

### What is the fastest way to check if matrix is invertible

I have a huge matrix that I suspect is not invertible. What is the fastest function in mathematica to test it ? I have remarked that MatrixRank is faster than NullSpace and Det, but is there an even ...
294 views

### Implementing positivity constraints over a six-dimensional hypercube

This question involves the same subject matter as my previous one (How can one achieve the most accurate estimates of certain six-dimensional integrals under specific constraints?), but with another (...
93 views

### How to do parallel computation when using LinearProgramming function?

I have a LP problem which contains 2n+3 variables with 4n+6 inequality constraints. I was trying to use Mathematica's LinearProgramming function. When n is small, like less than 30, it gives outcome ...
116 views

### Generation of Space Representation of non-crystallographic Point Groups

In Mathematica the command FiniteGroupData[{"CrystallographicPointGroup",<group number>}, "SpaceRepresentation"] yields the space representation (...
607 views

### Finding eigenvalues in Mathematica: why so slow?

I am trying to find the eigensystem of a large sparse real symmetric matrix, and I only need the lowest 40 or so eigenstates. The relevant code is as follows: ...
300 views

### Real Canonical Form of Arbitrary Size Matrices

I have been searching the site and the Mathematica documentation, but have not found anything regarding this. If we find the Jordan Form of the following matrix, we get complex values, but I would ...
75 views

### Derivative of eigenvalues

I work with 4x4 Hermitian matrices (r). I want to calculate a derivative of a function f[t,r] (ff[t_,r_]=1/2*D[f[t,r],t]), where the function f depends on the absolute value of the eigenvalues of r. ...
84 views

### Antisymmetric Matrix Eigenvector Normalization

So, I have a complex $4n \times 4n$ antisymmetric matrix, $A$ and it has a non-degenerate spectrum. The matrix $A$ then has eigenvalues given by  \beta_{1}, -\beta_{1}, \beta_{2}, -\beta_{2}, ... , ...
383 views

### solving linear systems with parameters

I am trying to solve simple, small linear systems, with parameters. I would like to have the result shown for various values of the parameter. RowReduce[], ...
80 views

### Matrix elements in terms of Minors?

Is there a simple way to rewrite a rectangular $m \times n$ matrix in terms of its maximal minors? For a few small cases, $(m,n)$ = $(2,3),(2,4),(3,4)$ I can brute force by explicitly solving: ...
213 views

### Matrix Exponentiation

This is in continuation with this one but it is more general. I will try to make it self contained. I have a program and I need to take the Dot product of many ...
119 views

### Determinant of 2-forms

I have matrix 4x4 and elements of the matrix are 2-forms. How to calculate determinant (in Mathematica 11) if this matrix using external product instead of normal product? I use components of Riemann ...
111 views

90 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 ...
432 views

### How to compute the Lovász number for the given graph in Mathematica?

Here is a graph whose adjacency matrix is ...