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.

Filter by
Sorted by
Tagged with
0
votes
0answers
22 views

Doesn't print the Inverse of a Matrix [duplicate]

I want to calculate and print the inverse of a Matrix. But it calculates it but doesn't show the Output. What can be the problem here?
2
votes
1answer
42 views

Square root of a matrix with complex elements

How to compute the square root of the matrix Rho = {{Wxx, Wxy, Wxz}, {Wyx, Wyy, Wyz}, {Wzx, Wzy, Wzz}} if not all of its elements are real?
1
vote
1answer
38 views

How to check positive linear dependence of vectors/matrices?

Suppose I have a bunch of vectors or matrices $v,v_1,v_2,\ldots, v_n$, living in an $N$ dimensional linear space. How to check (using mathematica) if $v$ is positively dependent on the set $\{v_1,v_2,\...
0
votes
1answer
62 views

Finding an eigenvector for a specific eigenvalue of a symbolic matrix

The relevant matrix is $$M=\left( \begin{matrix} p^3+\frac{1}{\sqrt{3}}p^8 & p^1-ip^2 & p^4-ip^5 \\ p^1 +i p^2 & -p^3 + \frac{1}{\sqrt{3}}p^8 & p^6-ip^7\\ p^4+i p^5 & p^6+i p^7 &...
1
vote
1answer
27 views

Simplify expression with abstract matrices

After defining a commutator function Commutator[X_, Y_] := X.Y - Y.X; I would like to be able to simplify abstract matrix algebra expressions such as ...
7
votes
0answers
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, ...
4
votes
1answer
93 views

How to collect the negative eigenvalues of a matrix?

I want to plot Sum[E[i]] verseus t where E[i] are the negative eigenvalues of the matrix: <...
1
vote
0answers
26 views

Analytic calculation of the Pfaffian using sqrt

I'm trying to calculate the Pfaffian of a matrix. In general, it is given by, $$Pf(A) = \sqrt{\det(A)}.$$ In my case, $A$ is a matrix of $8\times8$. When I calculate the determinant of $A$, it yields ...
1
vote
0answers
57 views

Finding eigenvalues of a large ( >1000 x 1000) matrix accurately

I'm doing a spectral method-based eigenvalue problem where I create a matrix, A, of size (nr+1)(nz+1)(2nf+1) where nr,nz,nf are integers, composed of a diagonal of (2nf+1) submatrices of size (nr+1)*(...
0
votes
1answer
40 views

Strange numerical values of Eigenvectors

When I calculate Eigenvalues and Eigenvector by using: Eigensystem[{{3.8, 21, 21}, {0.3, 3.5, 2.5}, {-0.8, -6.2, -5.2}}] I get the following result: ...
6
votes
1answer
76 views

How to use RiccatiSolve with symbolic matrix

According to the RiccatiSolve documentation the Eigensystem method can apply to symbolic matrices. However, I can not get it to ...
4
votes
1answer
95 views

Partial transpose of 8x8 density matrix?

Please could someone help me to knew how to compute the partial partial-transposition of the following matrix? mat = Table[ρ[i, j], {i, 1, 8}, {j, 1, 8}]
1
vote
0answers
36 views

What does Eigensystem::geinsl1 mean (a solution for the generalized eigenproblem may be incorrect)?

I'm trying to solve a generalized eigenvalue problem and ran across a warning Eigensystem::geinsl1: Warning: a solution for the generalized eigenproblem may be incorrect. Here's a minimal working ...
1
vote
1answer
23 views

No Plot output for function using large output from LinearSolve

I am using least squares approximation to fit the data in Y. However when I attempt to plot the the curve g[x] using the results from LinearSolve, there is no plot output. ...
1
vote
2answers
92 views

Why the difference in the results of MatrixFunction between Mathematica and Maple?

Mastering my Mathematica skills, I consider an example m = {{1., 1., 3.}, {0., 1., 0.}, {0., 1.0*I, 2.}}; cosm = MatrixFunction[Cos, m] $$\left( \begin{array}{...
0
votes
0answers
17 views

Showing span to be in R^2 space [migrated]

Let say L: R^2 -> R^2 (R refers to set of real numbers) and e1 and e2 to be the standard basis of R^2. I want to disprove that the span(L(e1),L(e2)) = R^2 by counter example. Please let me know if my ...
0
votes
0answers
29 views

nullity and rank [migrated]

I have no idea what the question is asking If A is row equivalent to $\mathbf I_5$, then the nullity of A is If T: $\mathbf M_n\times n (\Bbb R) \rightarrow \mathbf M _n\times n (\Bbb R)$ is an ...
2
votes
1answer
53 views

Calculating Minors of a 3x3 matrix not giving correct output [closed]

The function Minors[] does not return what its suposse to. Example: mat = {{a, b, c}, {l, m, n}, {x, y, z}} mat // MatrixForm Minors[mat] // MatrixForm The ...
6
votes
0answers
76 views

Memory usage for smallest eigenvalues

I have a bunch of hermitian matrices which are huge (of order 2^17 x 2^17) but extremely sparse so that, when I build the matrices, the usage of RAM is low (say of order 1 GB or similar). The ...
3
votes
2answers
171 views

Defining a*b=-b*a

I am fairly new to using Mathematica and was wondering if it's possible to define something along the lines of: $a*b=-b*a$ a sort of antisymmetry or skew symmetry if you will. I would like to do ...
2
votes
1answer
51 views

multiplying in the reverse order? [duplicate]

I have to multiply the matrices in the reverse order such as f[4].f[3].f[2].f[1] Have to be done by loops, because I have to multiply 10000 matrices all numerical values, for example the below code, ...
1
vote
1answer
73 views

SchurDecomposition doesn't work (in a weird way)

I have written a function to get the canonical form of a 3D quadric surface. This involves finding a unitary transformation of the coordinates which eliminates the cross-terms such as $xy$ or $xz$. ...
4
votes
2answers
61 views

Undesired complex number in the square root

I am trying to solve the eigenvalues of a hamiltonian The code I used is typed below. ...
2
votes
1answer
48 views
0
votes
0answers
52 views

“Greater” function gives me wrong order

When I try to sort the eigenvalues of the matrix (Rho) the results seems to be in the wrong order What is wrong with my code? ...
6
votes
1answer
84 views

Implicit Riccati Equation Solver (to find the anti-stabilizing solution)

I've found that the latest MATLAB icare() solver includes the possibility to find also the anti-stabilizing solution of the Riccati equation. I haven't found a ...
8
votes
1answer
235 views

Reusing PARDISO symbolic factorization

Is there a way to do this natively in Mathematica? I read in several places that this is possible with LibraryLink, but I don't have a lot of experience with C and so I'm having trouble implementing ...
1
vote
0answers
63 views

Least Square with quadratic constraint [closed]

I have the following problem:For $\theta \in \mathbb{C}^{n\times1}$, $\quad$ $Y=X\theta+W$ where $W \in \mathbb{C}^{m\times1}$ is the complex additive white Gaussian noise. $X \in \mathbb{C}^{m\...
1
vote
1answer
48 views

Arnoldi method misses eigenvalues degeneracies for very sparse matrices

I am here to signal a problem very very similar to the one already discussed here Wrong eigenvalues from a sparse matrix In particular, I have a very sparse matrix and I am asking just few dominant ...
0
votes
0answers
34 views

Parameter dependent linear independence check

Suppose I have a rectangular matrix $M(x)$ depending on a real parameter $x$. I want to find out for which $x$ are the columns of $M(x)$ linearly dependent (or equivalently, when $M(x)$ has a ...
4
votes
1answer
54 views

How do I perform an LU Decomposition without pivoting? [duplicate]

I know that LUDecomposition in Mathematica does a pivoted decomposition, finding an $LU$ such that $PA = LU$. However, I have a $4 \times 4$ matrix and I need to do ...
0
votes
1answer
59 views

Mathematica's Plot3D function gives me a scrambled plot

When I plot the band structure of the Lieb lattice, which has the Hamiltonian given in this code, I get a scrambled plot in the output. I've tried the exact same procedure with many different lattices ...
3
votes
3answers
77 views

Need help with finding a matrix

Could anyone please help me find a 4 by 4 matrix A such that A.Transpose[A] exactly equals the following matrix: ...
1
vote
2answers
104 views

Finding the square root of a 7*7 matrix with real entries

Suppose that I have the following symbolic 7*7 matrix ...
10
votes
1answer
133 views

Extract ViewVertical from ViewMatrix

Given a ViewMatrix setting of the form {t, p}, how can one determine the ViewVertical? Let'...
6
votes
2answers
94 views

Penalty function on discrete mesh using Laplace-Beltrami operator?

Context I am interested in extending to the ill-condionned regime the inversion of linear equations arising from inverting differential equations which have been solved via 0-splines over a mesh ...
4
votes
3answers
465 views

It seems Eigensystem[m] returns vectors that are not eigenvectors

I am new to here so please forgive me if I do something wrong carelessly. I have faced a serious problem in eigensystem method, or more particular, eigenvalue. It seems that the following codes that ...
2
votes
1answer
123 views

Symbolic solution of an iterative system

I am not an expert in Mathematica. I want to keep off from tedious calculation I want to solve (in symbolic sens) this system: $\quad AU^{j+1}+BU^{j}=F^{j}$ where: $*$ ${U}^{j}$ a $(N;1)$ vector $\...
0
votes
0answers
35 views

Root expressions inside Eigenvalues [duplicate]

I need the eigenvalues of this matrix as a function of Ny. When I tried whith a simpler matrix (4 x 4), it worked, but now, with this 25 x 25 matrix it returns what is shown in picture bellow: The ...
6
votes
1answer
127 views

Eigensystem of arbitrary 4x4 Matrix

While doing a computation, I needed to take numerical derivatives of eigenvectors of a 4x4 hermitian matrix with respect to a parameter. I ran into the issue of phase jumps -- a random phase ...
0
votes
0answers
34 views

How to tell mathematica that a variable is matrix?

I'm trying to apply the command SemidefiniteOptimization: ...
1
vote
0answers
58 views

Interpolation of a eigenvector of a matrix and its derivative

I have a matrix with two variables and the condition is I can't evaluate it's eigenvectors analytically. I want to interpolate its numerical eigenvectors and most importantly get a derivative of them ...
4
votes
1answer
77 views

Performing Hessenberg decomposition on a symbolic matrix

I am trying to calculate the Hessenberg decomposition of a symbolic matrix $$ A= \begin{pmatrix} 0 & -\mathrm ia & 0 & b \cos x \\ \mathrm ia & 0 & \mathrm ic \sin x & 0 \\ 0 &...
1
vote
1answer
73 views

How to plot this geometric object in 3D? [closed]

Let $v_{0}=(1,0,0)$. Then how to plot in 3D the geometric object $$\left\{ \left(v_{0}\cdot v_{1},v_{0}\cdot v_{2},v_{1}\cdot v_{2}\right):v_{1},v_{2}\in\mathbb{R}^{3} \text{are unit vectors}\right\} ...
2
votes
2answers
78 views

Tensor contraction

How do I let mathematica compute a tensor contraction like $\delta_{ab}\delta_{bc}$ with an output $\delta_{ac}$ efficiently? I tried TensorContract and TensorReduce but they were not helpful. ...
0
votes
1answer
51 views

QR-Decomposition [closed]

I should make a program in which with help of QR-decomposition find approximation of x^sinx shaped a+bLnx+c*e^x for a values x € ...
1
vote
1answer
61 views

Finding a Numerical Solution to a Linear Combination Inequality [closed]

Can I use Mathematica to find a value for $\alpha$ that satisfies the below linear combination inequality? If so, how? $$ \begin{bmatrix} -1 \\ -1 \\ -1 \end{bmatrix} < \begin{bmatrix} g_1 \\ \...
2
votes
1answer
42 views

`MatrixFunction` is returning a cryptic error message about “the function `1`”

The "Possible Issues" section of the documentation for MatrixFunction lists several possible ways in which a call to ...
1
vote
2answers
63 views

Plotting an integer-valued function

Consider the quantity $$H=n-1-\sum_{i\ne j} R_{ij}, $$where $R$ is a random $n\times n$ Hermitian matrix with trace $1$. The code that generates it was kindly provided by a user in another question of ...
3
votes
1answer
73 views

Defining a sum on the elements of a matrix

I am interested in defining the quantity $$H=n-1-\sum_{i\ne j} R_{ij}, $$where $R$ is a random $n\times n$ Hermitian matrix (as a side question: how should I go about adding the condition $\rm{Tr}(R)=...

1
2 3 4 5
23