# 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,117 questions
Filter by
Sorted by
Tagged with
66 views

### Integrating wavefunctions over a sphere

I am attempting to numerically solve the inner product of two particles and an electric dipole interaction potential. I am incredibly limited in my skills, and need to know how I can begin setting the ...
59 views

### Is it possible to solve for a matrix $m$ satisfying $m\cdot x=b$, given the vectors $x$ and $b$?

At first I thought it should be LinearSolve, which however turns out aiming at x, given m ...
122 views

### What am I doing wrong when trying to plot this function?

I'm trying to reproduce the computations of this paper and I'm running into some troubles because I'm rather new to Mathematica. In the paper's page 4, in figure 2 the authors show a plot of a ...
66 views

96 views

### Verifying equality $(\vec a \times \vec b)^2 = \left| \vec a \times \vec b \right| ^2$

I'm trying to verify the equality $(\vec a \times \vec b)^2 = \left| \vec a \times \vec b \right| ^2$ in Mathematica. How can I do it? Thank you for your time.
106 views

### Fastest, and numerically stable way to compute $CA^{-1}B$ and $CA^{-1}x$?

I have to compute $CA^{-1}B$ and $CA^{-1}x$, where $A,B,C$ are conformable matrices and $x$ is a vector. I'm not sure if it helps, but $A$ is symmetric and positive definite. The $A$ matrix will be ...
167 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 ...
69 views

### What is going wrong when I try to solve a simple linear equation? [closed]

I'm trying to understand how does the LinearSolve function works. I'm trying it out like this: A' ...
208 views

### Catastrophic loss of accuracy in Orthogonalize

Context In connection to this question I am interested in orthogonalizing known matrices. As a test case, let us consider the definite positive $15 \times 15$ matrix ...
55 views

### The Equation for solving Matrix is stiffnessmatrix.d == F

The Equation for solving Matrix is stiffnessmatrix.d == F. Where I know the Matrix {d} and [F] but [ stiffnessmatrix] is an 18x18 matrix contain 8 variable i need to solve for. Can anyone provide code ...
522 views

### Solve a system by Cramer's rule using loop

Consider the linear system AX=B,where A={{3, 0, 2}, {-3, 2, 2}, {2, -3, 3}},B={{3}, {-1}, {4}} and x=...
95 views

### Solving system of equations for coordinates

This is my first time here, so let me know if there's something I need to add to the post etc. Anyway, I need some help with Mathematica and linear algebra, and I got some tips that this would be the ...
696 views

### Orthogonal Projection of vector onto plane

I'm currently trying to learn Mathematica, and I've got some linear algebra tasks to solve with it. I've gotten quite far but now I'm stuck on this one exercise. The instructions are: With the help ...
73 views

### L1-norm optimization algorithm crashes kernel on large datasets

I have an A.X-B linear system which I have transformed into A.x-b to be solvable as a linear program using the code below: ...
852 views

### Change of basis in Mathematica

I'm trying to set up a change of basis matrix from the base V -> W with the RowReduce function that's built into Mathematica. I am then supposed to verify the result by taking the product of the ...
57 views

### Plotting Base-vectors not working properly [closed]

I'm stuck on a issue that I can't seem to solve. After defining values for V, W and x, I'm supposed to Plot two base-vectors in the base V and with the vector x in the same picture. I'm supposed to ...
44 views

### Find Transformation Matrix for Vectors of Functions, and Restrict Results of Solve Function

I have two vectors v,w which have a rather simple linear transformation A.v=w. My goal is to obtain ...
133 views

### Solve integer linear system [closed]

I want to find a solution of the system $$A x = 0,\quad x>0,\ x\in\mathbb{Z}^d$$ where the matrix $A$ has integer entries. With a single solution I am happy. There is a way to do this? If not, can ...
373 views

### How to compute eigenvalues of a large symbolic matrix?

I am trying to find eigenvalues for a big matrix having symbolic elements. Basically I am trying to find values of lambda for which matrix $(A-\lambda)$ is singular. For small matrices, we generally ...
124 views

46 views

### Is there one or more solutions to this system of stiff linear equations?

it is a question of hydrodynamics,and i have evaluated all the known Physical quantity，so there are only 6 unknown, I use the default of the solve function, but it can't get a solution, ...
124 views

### I have two lists that are the same, yet I get a FALSE when i try to show they are equivalent

I have tried changing the variables, reevaluating the cells, but it just keeps giving me false. The weird part is that it was originally true and it changed to false, randomly.I did not want to post ...
188 views

### Eliminating linear combinations from lists

Suppose I have a list of simple expressions, something like: list = {{a-b-2c-d+e+2f},{-a-2b-c+d+2e+f},{-2a-b+c+2d+e-f},{x-y-z},{-x+y-z},{-x-y+z}}; These ...
467 views

### Making an interactive visualization of the eigenvectors of two-dimensional matrices

I've recently stumbled upon this very nice interactive visualization of eigenvectors of two-dimensional matrices, and how powers $A^k$ act on various vectors. How can this sort of visualization be ...
66 views

### Eigensystem for simple equi-correlation matrix

I'm trying to get a set of eigenvectors for a correlation matrix, but getting stuck, maybe because I do not properly normalize them. For example, the following code works, in the sense that I get back ...
136 views

### Programming with Mathematica Syntax - Dunford decomposition

I am always amazed while I am reading some solutions of problems in mathematical problems of this site with Mathematica. For instance, look at the problem 48. Whereas I am writing 100 lines of code ...
80 views

### Find the base vectors of a point set

I have a list of coordinates that fits into a 2D periodic lattice, with some error ( $\vec{R}=n\vec{i}+m\vec{j}+\vec{\varepsilon}$). Is there a way to find the base vectors of the lattice? I guess the ...
214 views

### Save and use results of LinearSolve for symbolic large system (28 equations)

I need to solve system of 28 linear equations, for 28 variables, symbolicly. The coefficient matrix is sparse, and is composed from 8 parameters (symbols). After that I need to use 6 of the variables ...
167 views

### Summation of Kronecker deltas should give the dimension

I have a really simple problem but I don't know how to solve it. Basically, I am doing vecor manipulation and I am summing a lot of Kronecker delta here and there. How can I teach Mathematica that for ...
61 views

### An error of unequal length when using Transpose[y]? [closed]

Why do I get this error? I just clicked shift+enter in the y and it appeared. https://i.stack.imgur.com/IAKs8.png This is the data ...
18 views

### Matrix multiplication Q.W not working - Result=matrix Q . matrix W [duplicate]

When I write the code to do the dot product between two matrices, Mathematica does not compute it: How can I get the right matrix? EDIT Thank you for your willingness.
118 views

### How to find clusters with same cluster sizes?

I have a set of 71 data points. Each data point is represented by its latitude and longitude. I want to divide them into 12 clusters. The first 11 cluster will have exactly 6 points each and 12th ...
78 views

### How to solve a matrix $Ax=0$, where matrix $A$ is a function of $ω^2$ [closed]

I have a matrix $A$ which depends on $ω^2$. I wanted to solve for $ω$. The usual procedure is taking the Det[A] and equate to zero and solve for it. How can I ...
140 views

### Det, MatrixRank and Eigenvalues

I consider myself to be an inexperienced Mathematica user so maybe someone could point out what am I doing wrong. In short, here is what I want to get: suppose that there is a matrix of dimension \$ N ...