Questions tagged [matrix]
For questions about using and representing matrices on a computer in order to solve computational problems. Should generally also include a tag about the specific property/problem you are solving (e.g. [tag:linear-algebra], [tag:eigenvalues], [tag:inverse].
28
questions
1
vote
1
answer
61
views
What are some good medium matrices with known eigenvectors?
I am trying to test if an eigendecomposition I have is working properly. For this I would like some matrices that are 10x10 (ish) with trivial (or known) eigenvectors and eigenvalues so that I can ...
0
votes
0
answers
33
views
Fastest way to calculate the eigenvector with the largest eigenvalue for a 3*3 positive-definite matrix [duplicate]
As stated in the title: I have a 3 by 3 positive-definite matrix $M$. What I need is the eigenvector corresponding to the largest eigenvalue, since I am calculating the solution to maximize the value ...
10
votes
0
answers
169
views
What's the most computationally efficient implementation of Kalman Filter
I know there are many formulations of the Kalman Filter. A few I can name are:
Classical Covariance Form
Informational Filter Form
Square-Root Form or Factor Form
But somehow it's hard for me to ...
0
votes
1
answer
81
views
optimize this python code that involves matrix inversion
So I have this line of code that involves a matrix inversion
X = A @ B @ np.linalg.pinv(S)
$A$ is an $n$ by $n$ matrix, $B$ is an $n$ by $m$ matrix and $S$ is an $...
4
votes
1
answer
103
views
How can I efficiently find an anti-symmetric generator of a special orthogonal matrix?
Given a special orthogonal matrix $O$ (i.e: $OO^T = 1$ and $\det(O) = 1$), I am trying to efficiently find a matrix $X$ such that $O = e^X$ and $X = -X^T$ using Python (NumPy & SciPy).
One obvious ...
2
votes
0
answers
86
views
What is fastest method for finding the minimum and maximum eigenvalues of a (possibly very large) symmetric matrix?
What is the best way to find the extreme eigenvalues - in order to find the spectral radius - of a general real dense symmetric matrix?
Looking at similar questions e.g.: What's the most efficient ...
0
votes
0
answers
36
views
Lumped (diagonal) vs. consistent (non-diagonal, symmetric) mass matrix in Nastran
I've been tinkering with DMAP to explore the procedure followed by Nastran when solving a complex modes analysis.
I've reached a passage I cannot understand: at some point Nastran formulated what it ...
0
votes
1
answer
79
views
What do diagonal (DOF-to-self) terms of stiffness matrix physically mean?
I am used to interpreting each entry of a solid mechanic system's stiffness matrix as a 1D (linear or angular) spring joining one DOF (column index) to another (row index).
But this interpretation ...
5
votes
2
answers
156
views
Optimized Lanczos method for finding eigenvalues of $A \otimes B$
Recently my supervisor told me about an efficient way to calculate eigenvalues and eigenvectors of matrix $A \otimes B$ with $a_{1} \times a_{2}$ as dimensions of $A$ and $b_{1} \times b_{2}$ is of $B$...
1
vote
0
answers
58
views
Orthogonal Transformation of Hessenberg Matrices
$H\in\mathbb{R}^{n\times n}$ is an upper Hessenberg matrix. Suppose $\lambda$ is an eigenvalue of $H$ and $x$ is an eigenvector w.r.t. $\lambda$. Is there any fast algorithm that can find an ...
2
votes
2
answers
170
views
Confusion about matrix differentiation in a nonlinear matrix equation
I am trying to solve a matrix equation in the following discrete form:
$$
\frac{K^{n+1}-K^n}{\Delta t} = [(K^{n+1} (V^{n})^T).^3 - K^{n+1} (V^{n})^T]V^n.
$$
where $K^{n+1} \in \mathbb{R}^{m \times r}, ...
0
votes
1
answer
70
views
Weird runtime behavior of `scipy.linalg.solve_triangular` and `trtrs`
I want to understand the time complexity of scipy.linalg.solve_triangular, which calls trtrs from LAPACK under the hood, so I ...
1
vote
0
answers
107
views
How to implement boundary conditions for the Thomas algorithm
For my variable $U(t,x)$, I have implemented the thomas algorithm with $U_j^i$:
$$ a(x)U_{j-1}^{i+1}+ b(x)U_j^{i+1} + c(x)U_{j+1}^{i+1} = d(x)U_j^{i} $$
Then $\textbf{A}$ is a tridiagonal vector with ...
1
vote
1
answer
206
views
How do BLAS libraries implement support for transposed matrices?
I'm trying to understand how BLAS libraries implement fast GEMM with support for transposed matrices. Say, I'm only operating on square matrixes (with dimensions n ...
1
vote
0
answers
125
views
How to vectorise numerical differentiation
I have a 2-D matrix with 2 spatial coordinates and I want to be able to vectorise the process of numerically differentiating with respect to its 2 coordinates, rather than just looping along the rows ...