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
3
votes
2answers
288 views

How to solve a linear system like that

I'm trying to reproduce the following result: with ...
-3
votes
1answer
59 views

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

I have this code for Gram Schmidt: ...
0
votes
0answers
31 views

Speed up my own Orthogonalize and QRDecomposition [duplicate]

I defined Gram-Schmidt like this: ...
3
votes
2answers
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 ...
0
votes
0answers
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: ...
4
votes
1answer
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 ...
1
vote
2answers
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: ...
1
vote
0answers
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. ...
2
votes
0answers
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: ...
0
votes
0answers
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 ...
0
votes
1answer
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/<...
2
votes
0answers
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 ...
3
votes
2answers
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 ...
4
votes
4answers
215 views

Double contraction between 2nd and 4th rank tensor

I would like to compute the double dot product between a 2nd and 4th rank tensor in mathematica $A_{kl}A_{ijkl}$ $if \, A_{kl}=\begin{pmatrix} 1& 0 & 0\\ 0 & 1 & 0\\ 0&0 & 1 \...
1
vote
1answer
104 views

Symmetric part of a 4th rank tensor in mathematica

I am quite new to Mathematica and would like to know how to compute the symmetric part of a 4th order tensor $A_{ijkl}$. Since there are 4 indices (i,j,k,l), we have 4!=24 permutations. The symmetric ...
1
vote
0answers
55 views

Online Mathematica, pros and cons, linear algebra problem

I apologize in advance if this question is irrelevant to this website. I would like to use Mathematica to solve a system of linear equations with lots of unknowns(729 unknowns), the unknowns are ...
2
votes
0answers
42 views

Verifying Gram-Schmidt Algorithm with Mathematica [closed]

According to a review of the Graham-Schmidt alogirithm in my textbook: This is only the first part of the procedure, but it's what I'm focused on for this post. I attempted to verify that $\langle 1 ...
0
votes
2answers
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 ...
7
votes
2answers
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 & \...
0
votes
0answers
41 views

How to find efficiently all positive linear dependencies between some vectors

I've got these vectors ...
1
vote
3answers
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 ...
4
votes
2answers
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 ...
1
vote
0answers
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 ...
0
votes
3answers
164 views

How to make conjugate transpose of this matrix?

The 4x1 matrix is defined as: ...
0
votes
1answer
75 views

Solving linear systems efficiently

In certain calculation I encountered a system of linear equations in 144 variables, and it takes hours to compute. Most probably the reason is that coefficients are really huge integers (about $10^{50}...
1
vote
1answer
58 views

Matrix sign function?

I need to use the matrix sign function, implemented as signm in Matlab. Is there a Mathematica version?
0
votes
0answers
141 views

Not understanding the reason for not getting full rank matrix

I have a structure shown in figure. It has four members. Each member has represented by two displacement field $W_i$ and $U_i$. I have expressed this displacement field using some functions. I found ...
0
votes
3answers
102 views

Solve for matrix in linear equation

I need to find a matrix M such that M.u = v, where u and ...
0
votes
2answers
63 views

Linear Combination of functions resulting in a function with different end conditions

I have a set of 8 functions (I have stored it in a list called beammodes). I am multiplying these functions with a set of 8 scalar values (I have stored it in a ...
2
votes
2answers
158 views

Solving Simultaneous equations of matrices

I am in a precarious situation where I have two equations: eq1 = α1 + αt12.t1 + αr11.r1 == 0; eq2 = γ1 + γt12.t1 + γr11.r1 == 0; Where each variable is a 3x3 ...
0
votes
2answers
168 views

Random rotation at a given angle?

I need to generate a random rotation matrix for a given angle $a$. In other words, a random $n\times n$ matrix $A$ such that for any unit-length vector $v$ the following is true. $$v'Av\le\cos a$$ The ...
0
votes
0answers
38 views

Problem in getting the full rank of a matrix

I have 17 equations I am trying to put them in the matrix form. I am trying to understand why the matrix is not full rank. ...
0
votes
1answer
109 views

Simple Question: How to simplify what is inside the Sin function like below?

I have this code of Mathematica (1/(2 (fj - fk) π)) Cos[(fj - fk) π T + (fj - fk) π (T + δt)] Sin[(fj - fk) π T - (fj - fk) π (T + δt)] There are a few ...
0
votes
2answers
56 views

Solve the system using elimination What are a, b, and c in the quadratic equation, ax^2+bx+c=y given the [closed]

Solve the system using elimination What are a, b, and c in the quadratic equation, ax^2+bx+c=y given the points: (2,17), (-2,9), and (1,6), please solve the question using steps e.g. (step 1, step 2)?
3
votes
3answers
100 views

Solving equation involving max-row-sum matrix norm?

I'm trying to solve for $\|A(a)\|_\infty=1$ where $A$ is a positive definite matrix parameterized by scalar $a$ and $\|.\|_\infty$ is max-row-sum norm of the matrix. For the problem below, I know the ...
0
votes
1answer
162 views

Solving System of Equations

I want to solve a huge system of equations which is generated using the Finite-Difference-Method. The Problem with that system is that it is badly conditioned and so ...
0
votes
1answer
53 views

Searching for elegant way manipulate complex vectors

I have some complex vectors that I would like to normalize and further manipulate. For example, one is this: ${\qquad \rm vec}=(-\frac{-a + b + \sqrt{a^2 - 2 a b + b^2 + 4 c^2 + 4 d^2}}{2 (c + i d)},1)...
1
vote
3answers
72 views

Find The Value of a n-order Determinant

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{...
1
vote
1answer
59 views

Re-expressing equations [closed]

$$Y = \frac{1}{\sqrt{2}}D+\frac{1}{\sqrt{2}}U$$ $$X = \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....
0
votes
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}}
3
votes
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 ...
1
vote
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. ...
0
votes
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.$$ ...
1
vote
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 ...
3
votes
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 ...
0
votes
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
1
vote
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}...
0
votes
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 ...
3
votes
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} ...
1
vote
1answer
64 views

How to find the p-norm that meets the requirements?

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

1 2 3
4
5
28