# Questions tagged [linear-algebra]

Questions on the algorithmic/computational aspects of linear algebra, including the solution of linear systems, least squares problems, eigenproblems, and other such matters.

806 questions
1answer
113 views

### Compute bilinear form with LAPACK

I need to compute a bilinear form for a set of left and right vectors $$w_k = \sum_{i,j} V_{ik}^*A_{ij}U_{jk},$$ where $A_{ij}\in\mathbb{R}$ and $U_{jk}, V_{ik} \in \mathbb{C}$ (Assume that all the ...
1answer
78 views

### Matrix exponential of hermitian matrix with eigenvectors from generalized eigenvalue problem

I want to calculate the following expression $$\exp(-i\Delta t\mathbf{H})$$ where $\mathbf{H}\in\mathbb{C}^{n\times n}$ is a hermitian matrix. Since I have a highly optimized eigensolver in the code ...
0answers
81 views

### Non-linear equation solver algorithms

I currently have code that uses the biconjugate gradient stabilized (bicgstab) method to solve $Ax = b$ for $x$, where I never create the $A$ matrix explicitly, but only have a function $F(x) = Ax$ ...
3answers
200 views

### Nonlinear eigenvalue problem - MATLAB code

I'm trying to solve a nonlinear eigenvalue problem in MATLAB, still without success. It's a problem about graphene plasmonics. The nonlinear eigenvalue problem is given below: \frac{...
0answers
92 views

### Using Gram-Schmidt to obtain Spherical Harmonics

If we don't know the Spherical Harmonics offhand, we could try to observe they are stratified by degree. So that $x^a y^b z^c$ will have degree $n = a+b+c$. These do not form an orthonormal basis, ...
1answer
169 views

### How to solve the inverse problem of least-squares?

Focusing on following least squares problem: $$\min\limits_{V} \lVert Z - WV \rVert _{_F}^2$$ $$Z∈{R}^{m\times n},\quad W∈{R}^{m\times k},\quad V∈{R}^{k\times n},\quad k\lt m\lt n$$ This problem ...
1answer
45 views

### Transform from linear index of a packed triangular matrix to dense indices

Given indices $i,j$ s.t. $0\leq i \leq j <n$, the function $f(i,j)=i+j(j+1)/2$ maps 2d indices to linear indices in column major order. What is the fastest way to invert this function? My first ...
2answers
218 views

### Is large condition number good measure of nearness to singularity for a matrix?

I am new to numerical linear algebra, so i came to know that condition number in 2-norm case will be ratio of largest to smallest singular value. Another concept "Nearness To Singularity" is measured ...
1answer
117 views

### How can I apply Euler's Method to predict a point in time rotating around multiple axis'

I am xposting this from my original stackoverflow question where I was presented with a coding challenge that I have been able to narrow down extensively and I think it lies with Euler's Method. Here'...
1answer
181 views

2answers
56 views

1answer
82 views

### How to do a Generalized Complex Schur (or QZ) Decomposition with Eigen C++? [closed]

I would like to do a Generalized Schur (or QZ) decomposition for a pair of complex matrices $A$ and $B$. I found the following class: ...
0answers
29 views

### What is a performant clustering algorithm for approx 10,000 vectors of approx 30 dimension?

I have a set of real-valed vectors, for example $S = \{v_1, v_2, ..., v_k\}$ $v_i = \begin{pmatrix} age_i \\ height_i \\ weight_i \\ ... \end{pmatrix}$ or whatever. Each vector has on the order of ...
2answers
140 views

### MATLAB Matrix Multiply Efficiency

I am using MATLAB to prototype a few matrix multiply techniques and compare efficiency. Eventually, I will move the prototype codes to C. It is for a homework assignment where we need to write an ...
0answers
51 views

1answer
155 views

### How to show that Gauss-Seidel iterative method is equivalent to successively setting each component of residual vector to zero?

As stated in the title, it's said in the book that Gauss-Seidel iterative method is equivalent to successively setting each component of residual vector to zero. After rearranging G-S scheme, I got ...