# 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.

1,379 questions
Filter by
Sorted by
Tagged with
288 views

### How to solve a linear system like that

I'm trying to reproduce the following result: with ...
59 views

### Having trouble coding my own QR decomposition using Gram Schmidt [closed]

I have this code for Gram Schmidt: ...
31 views

### Speed up my own Orthogonalize and QRDecomposition [duplicate]

I defined Gram-Schmidt like this: ...
376 views

### Matrix multiplication of non-commuting objects

I have two matrices, $A$ and $B$. The elements of these matrices are some abstract non-commuting objects, which I'm just representing as variables. For now, I don't care about having Mathematica know ...
42 views

### Hi! I'm trying to do SVD decomposition but I'm having some problems

So I have this code for QR Householder decomposition: ...
127 views

### Sort eigenvectors by eigenvalue and assign to variables

I have the following question: Let T = {{0, 0, 2}, {0, 0, 0}, {2, 0, 3}}, I know that its eigenvalues, in a decreasing order, are 4, 0 and -1. Mathematica displays ...
123 views

### QR decomposition using Gram Schmidt [closed]

First of all I don't want to use the reflection method, only Gram-Schmidt. So here's the program for Gram-Schmidt: ...
38 views

### How to speed up this code (finding eigenvector with smallest eigenvalue)? [closed]

I have following code. The function TraceSystem is to take partial trace of matrix and I think this part is fine. The main code is below in dd and I think the main problem is in here for Eigenvector. ...
88 views

### What is the fastest way to get the lowest eigenvalue and corresponding eigenstate in Mathematica?

I tried to use the Arnoldi method to get the smallest eigenvalue and corresponding eigenstate for large matrix. However, Arnoldi did not give me the desired result: ...
38 views

### Doubt regarding the creation of a symbolic 2nd rank symmetric tensor in Mathematica

I would like to ask the following: In a previous post it was asked how to create a 2nd-order symbolic tensor in Mathematica. Given the following notation ...
90 views

### Having problem in evaluating the eigenvalues of an $11\times11$ symmetric matrix in Mathematica [closed]

I am solving an $11\times11$ matrix in Mathematica. I am facing problem when I try to find the determinant or eigenvalues of this matrix. The error (Det::matsq/<...
75 views

### Trigonometric Simplification and Double Angle Formula

I am trying to achieve the formula hbar / 2 * cos(wt) * sin(theta). However, my Mathematica expression doesn't seem to simplify the half/double angle formulas. I am ...
138 views

### How to efficiently check if a matrix is a Toeplitz Matrix

With ToeplitzMatrix we can create a Toeplitz matrix from a list of values. I have a question going in the opposite direction, namely, how to efficiently check if a ...
215 views

127 views

### How do I integrate a For loop to generate iterations of the Sierpinski's Triangle?

I'm sorry if this is a basic question—I don't know anything about programming. I know you can create a graphic of Sierpinski's Triangle with a single command, but I'd like to know how to create one ...
558 views

### How do I invert my matrix?

I have the following matrix $M$: \begin{bmatrix} P & p & 0 & 0 \\ pe_1 & Pe_1 & \sqrt{P^2 - p^2}q_1 & \sqrt{P^2 - p^2}r_1 \\ pe_2 & Pe_2 & \sqrt{P^2 - p^2}q_2 & \...
41 views

### How to find efficiently all positive linear dependencies between some vectors

I've got these vectors ...
68 views

### Solve function used symbolic computation yields all the coefficients value zeros

I am trying to compute the symbolic coefficients of using Solve function. But this is yielding all the coefficients values zeros. What are the other ways to find ...
145 views

### Compute the stationary distribution of a large transition matrix

I am doing some simulations for simple random walks on directed random graphs. From a graph of n vertices, I get a n by ...
69 views

### Solving $E[abXab]=Y$ for Gaussian $(a,b)$

I have $d/2$-dimensional variables $a,b$ jointly distributed as Gaussian($\mu,\Sigma$) in $d$ dimensions, and need to solve the following equation for $X$ $$E[ab^TXab^T]=Y$$ This is equivalent to ...
164 views

### How to make conjugate transpose of this matrix?

The 4x1 matrix is defined as: ...
75 views

In Mathematica, we can find the value of a determinant with the built-in function Det. But how can I find the value of a determinant like this one? $$\left|\begin{... 1answer 59 views ### Re-expressing equations [closed]$$Y = \frac{1}{\sqrt{2}}D+\frac{1}{\sqrt{2}}UX = \frac{1}{\sqrt{2}}D-\frac{1}{\sqrt{2}}U$$I have above two equations. I want to rewrite the above equations in terms of D and U in Mathematica.... 2answers 140 views ### How do I construct a matrix using table command. I can not form it's function I have to form a matrix like this. How ever I can not directly input. I have to form a function and then use the table command. I am stuck. {{2,5,10},{9,12,17},{28,31,36}} 1answer 66 views ### How to obtain eigenvectors in AceGen I'm trying to obtain eigenvectors of a 3D plastic stretch tensor C_p. There is no SMSEigenvectors function, so I tried with ... 0answers 102 views ### linear interpolation error [closed] I have two set of data for pressure and energy density and I used a linear interpolation to apply the data as a function in terms of each other. ... 2answers 110 views ### How to define some functions automatically? I want to use Gauss-Seidel iteration to solve this problem.$$\left\{\begin{array}{l} 8 x_{1}-3 x_{2}+2 x_{3}=20 \\ 4 x_{1}+11 x_{2}-x_{3}=33 \\ 6 x_{1}+3 x_{2}+12 x_{3}=36 \end{array}\right.$$... 0answers 89 views ### Reducing generalized eigenvalue problem to regular eigenvalue problem I expected generalized eigenvalue problem on (A, B) to reduce to eigenvalue problem on B^{-1} A when A, B are full rank (Section 7.1 of generalized eigenvalue tutorial), but I get different ... 2answers 152 views ### Logarithm of singular matrices I wanted to calculate following quantity: X=Tr[\rho_1 \log[\rho_2]], as in the relative entropy. Here, \rho_1, \rho_2 are positive semidefinite matrices with non-orthogonal support (so that the ... 1answer 334 views ### Degenerate matrix diagonalization When you diagonalize a matrix, and two eigenvalues are degenerate, is there a way to ask Mathematica for specific eigenvectors? Thanks 2answers 297 views ### How to obtain the Gauss-Seidel iterative results in this form? I need to use the Gauss Seidel iterative method to solve the linear equations \left\{\begin{array}{l} 8 x_{1}-3 x_{2}+2 x_{3}=20 \\ 4 x_{1}+11 x_{2}-x_{3}=33 \\ 6 x_{1}+3 x_{2}+12 x_{3}=36 \end{array}... 0answers 56 views ### Solving multiple systems using Cholesky factorization to find Inverse of a matrix I have a matrix: A = {{1, 1, 1, 1}, {1, 5, 5, 5}, {1, 5, 14, 14}, {1, 5, 14, 30}} I wrote code in Mathematica (mostly copying what professor gave us, I'm new to ... 2answers 239 views ### How to realize the inner product of function concisely? A family of functions is known as \left(\varphi_{0}, \varphi_{1}, \cdots, \varphi_{n}\right). I'd like to know how to express their inner product conveniently as follows:$$\left(\begin{array}{cccc} ...
On page 183 of this book there is Theorem 3: In other words, if the spectral radius of a matrix B is less than 1, there must be a norm $||B||_{p}$, so that \$||B||...