Questions tagged [numerical-linear-algebra]

Questions on the various algorithms used in linear algebra computations (matrix computations).

Questions tagged with this tag can be about, but not limited to:

  1. Matrix decompositions like SVD, QR, Cholesky, etc.
  2. The solution of linear systems and least squares problems.
  3. Analysis of numerical linear algebra algorithms like condition numbers and stability analysis.
  4. Eigenvalue problems.
  5. The designs of direct or iterative methods to solve linear systems.
3665 questions
73
votes
3 answers

Distance/Similarity between two matrices

I'm in the process of writing an application which identifies the closest matrix from a set of square matrices $M$ to a given square matrix $A$. The closest can be defined as the most similar. I think finding the distance between two given matrices…
57
votes
3 answers

block matrix multiplication

If $A,B$ are $2 \times 2$ matrices of real or complex numbers, then $$AB = \left[ \begin{array}{cc} a_{11} & a_{12} \\ a_{21} & a_{22} \end{array} \right]\cdot \left[ \begin{array}{cc} b_{11} & b_{12} \\ b_{21} & b_{22} \end{array} \right] =…
32
votes
6 answers

Determinant of large matrices: it must exist a faster way

WARNING this is a very long report and is likely going to cause boredom. Be warned!! I've heard of the determinant of small matrices, such as: $$\det \begin{pmatrix} a&b\\ c&d\\ \end{pmatrix} = ad-bc $$ case in point: $$\det \begin{pmatrix}…
26
votes
4 answers

Fast algorithm for solving system of linear equations

I have a system of $N$ linear equations, $Ax=b$, in $N$ unknowns (where $N$ is large). If I am interested in the solution for only one of the unknowns, what are the best approaches? For example, assume $N=50,000$. We want the solution for $x_1$…
25
votes
3 answers

What does QR decomposition have to do with least squares method?

I know that QR decomposition is a mean to solve a system $Ax=b$ by doing $A = QR$ and then solving $Qy = b$ and then $Rx=y$. I know that the least squares method is used to find $\min ||Ax-b||$, that is, it can find the $x$ that is closest to solve…
25
votes
2 answers

The benefit of LU decomposition over explicitly computing the inverse

I'm going to teach a linear algebra course in the fall, and I want to motivate the topic of matrix factorizations such as the LU decomposition. A natural question one can ask is, why care about this when one already knows how to compute $A^{-1}$ and…
23
votes
4 answers

How to compute the smallest eigenvalue using the power iteration algorithm?

I need to write a program which computes the largest and the smallest (in terms of absolute value) eigenvalues using both power iteration and inverse iteration. I can find them using the inverse iteration, and I can also find the largest one using…
22
votes
4 answers

Determining whether a symmetric matrix is positive-definite (algorithm)

I'm trying to create a program, that will decompose a matrix using the Cholesky decomposition. The decomposition itself isn't a difficult algorithm, but a matrix, to be eligible for Cholesky decomposition, must be symmetric and positive-definite.…
20
votes
3 answers

Fast computation/estimation of the nuclear norm of a matrix

The nuclear norm of a matrix is defined as the sum of its singular values, as given by the singular value decomposition (SVD) of the matrix itself. It is of central importance in Signal Processing and Statistics, where it is used for matrix…
18
votes
3 answers

On computing the largest eigenvalue of a very large sparse matrix

I am trying to compute the asymptotic growth-rate in a specific combinatorial problem depending on a parameter w, using the Transfer-Matrix method. This amounts to computing the largest eigenvalue of the corresponding matrix. For small values of w,…
18
votes
1 answer

Numerically stable method for angle between 3D vectors

I'm looking for a numerically stable method for computing the angle between two 3D vectors. Which of the following methods ought to be preferred? Method 1: $$ u \times v = \|u\| ~ \|v\| \sin(\theta) \textbf{n} \\ u \cdot v = \|u\| ~ \|v\|…
Murphy
  • 181
17
votes
2 answers

Uniform sampling of points on a simplex

I have this problem: I'm trying to sample the relation $$ \sum_{i=1}^N x_i = 1 $$ in the domain where $x_i>0\ \forall i$. Right now I'm just extracting $N$ random numbers $u_i$ from a uniform distribution $[0,1]$ and then I transform them into $x_i$…
17
votes
3 answers

What is the minimum and maximum number of eigenvectors?

I am given the eigenvalues of a square, 8x8, matrix. They are all non-zero. I have determined that the matrix is diagonalizable and has an inverse. In one part of the problem, I am asked to find the maximum and minimum number of eigenvectors that…
Ayoshna
  • 1,423
  • 7
  • 31
  • 58
16
votes
3 answers

Cholesky decomposition of the inverse of a matrix

I have the Cholesky decomposition of a matrix $M$. However, I need the Cholesky decomposition of the inverse of the matrix, $M^{-1}$. Is there a fast way to do this, without first computing $M^{-1}$? In other words, is there a relationship between…
16
votes
1 answer

Block inverse of symmetric matrices

Let us assume we have a symmetric $n \times n$ matrix $A$. We know the inverse of $A$. Let us say that we now add one column and one row to $A$, in a way that the resulting matrix ($B$) is an $(n+1) \times (n+1)$ matrix that is still symmetric. For…
1
2 3
99 100