Questions tagged [matrix-equations]

This question is about equations where the unknown itself is a matrix such as Sylvester or Riccati equations. For systems of linear equations (where the unknown is a vector), use "linear-system".

Filter by
Sorted by
Tagged with
1 vote
0 answers
56 views

SVD decomposition and the update problem of matrix differential equations

For a matrix $Y(t) \in \mathbb{R}^{m \times n}$, its rank-r approximation could be represented in a factorized SVD-like form. $$ Y(t) = U(t) S(t) V^T(t), $$ where $U^{T}U = I_m$, $V^{T}V = I_n$ and $S ...
Owen Jun's user avatar
  • 141
2 votes
2 answers
165 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}, ...
Owen Jun's user avatar
  • 141
2 votes
1 answer
81 views

Solving for $X$ in $\sum_{a,b} b a^T b^T X a = Y$

Suppose I have $k$ pairs of $(a,b)$ where $a$ and $b$ are vectors in $\mathbb{R}^d$, $Y$ is $d\times d$ and I need least squares solution for $X$ in the following $$\sum_{(a,b)}^k b a^T (b^T X a) = Y$...
Yaroslav Bulatov's user avatar
3 votes
1 answer
187 views

Solving underdetermined Lyapunov equation?

I'm solving the following for $X$ with $A,B$ singular positive semidefinite matrices. $$AX + XA = B$$ Because $A$, $B$ are singular, standard Lyapunov solver fails However, if I heuristically skip ...
Yaroslav Bulatov's user avatar
0 votes
0 answers
104 views

What is the difference between approximations of mixed derivative and how to implement it

currently I am solving 2D nonlinear second order differential equation containing mixed derivative. I started searching how to descretisize it and found two formulas for 4th order approximation. First ...
Andrew's user avatar
  • 31
2 votes
1 answer
97 views

Solve linear system for only part of the solution vector

I am using the ScaLAPACK PDGESV routine to solve large dense linear systems distributed over many supercomputer nodes, but ultimately I only need a small portion of the solution vector (e.g. the first ...
quixedjetr's user avatar
0 votes
1 answer
92 views

Is it possible to express the solution of a matrix Riccati differential equation as an eigenvalue problem?

This is related to my previous question How can I express the solution to a discrete Lyapunov equation as an eigenvalue problem?. Given the algebraic Riccati equation (ARE) $$A^T X + XA + XRX + Q = 0$$...
mhdadk's user avatar
  • 165
4 votes
5 answers
651 views

Matrix derivative

I am looking to compute the derivative of the following expression: $$\frac{\partial}{\partial X}\mathrm{tr}\left[A\exp(X)\right]$$ where $A$ is both a symmetrical and positive-definite matrix and $X$ ...
PC1's user avatar
  • 436
2 votes
2 answers
245 views

How can I express the solution to a discrete Lyapunov equation as an eigenvalue problem?

Given the discrete Lyapunov equation $$AXA^T - X + Q = 0$$ how can I solve for $X$ as a function of the eigenvectors of some matrix $H$? More precisely, in the case of the continuous Lyapunov equation ...
mhdadk's user avatar
  • 165
1 vote
1 answer
115 views

How can I find the eigenvectors of a Hamiltonian matrix to solve a Riccati equation?

Given the Algebratic Riccati Equation (ARE) $$A^T X + XA + XRX + Q = 0$$ where $A,R,Q \in \mathbb R^{n \times n}$, we are interested in the matrix $X$ that solves this equation. If we define the $2n \...
mhdadk's user avatar
  • 165
0 votes
1 answer
72 views

Solution $X$ for $X(X^TX)^{-1}=X(Y^TY)^{-1}$

I have a square matrix $Y$ and I would like to find the solution $X$ for the following equation: $$X(X^TX)^{-1}=X(Y^TY)^{-1}$$ In this equation, we can suppose that $Y^TY$ is invertible. We could also ...
PC1's user avatar
  • 436
1 vote
2 answers
508 views

Solution to Sylvester-like equation

I have an equation that is a bit similar to a Sylvester equation. The equations is $AXB^T+X=E$, where all variables are matrices. I could try to inverse $B$ and rewrite the equation as $AX+XB^{-T}=EB^{...
PC1's user avatar
  • 436
1 vote
0 answers
39 views

Solution to minimization problem when variables factor in 2 analytical problems

I am asking a follow up question to this question, but I could probably have written it as an answer instead. However, I don't know if what I am doing here makes sense or is too complicated for my ...
PC1's user avatar
  • 436
2 votes
1 answer
472 views

Matrix regularisation for ill-conditioned problems

I have read that matrix regularisation can improve the stability of LU or Cholesky decomposition of ill conditioned problems. The idea is to add a value to the diagonals of a matrix: $B=A+cI$ In the ...
vydesaster's user avatar
2 votes
1 answer
112 views

Iterative solution for a minimization problem involving matrix equations

I have a real valued function $F$ for which I am looking to find its global minimum. The function is well behaved and I can obtain its Jacobian. I could also compute the Hessian but the function ...
PC1's user avatar
  • 436
3 votes
0 answers
61 views

Finite difference on matrices

This question relates closely to another question I asked earlier this week. Let's say that I want to find a set of matrices $S_i$, with $0\leq i\leq N$, that minimizes some objective function with ...
PC1's user avatar
  • 436
5 votes
2 answers
423 views

Recurrence relation for matrices

I have matrices ($S_0$ thought $S_N$) and I have a recurrence relation that link successive matrices together. $$S_i + S_i(aS_{i-1}^{-1})S_i=C_i+aS_{i+1}$$ We can assume for this problem that $S_0=S_N=...
PC1's user avatar
  • 436
1 vote
0 answers
87 views

Constrained optimization for non-linear equations in octaveGNU

I have installed Optim1.6.1 package. I would like to solve a system of equations in non linear finite element analysis using constraints as u=1 at certain nodes. u=0 at certain nodes. Typically I find ...
Bruce Lee Jun Fan's user avatar
1 vote
1 answer
574 views

MATLAB : find an algorithm to inverse quickly a large matrix of symbolic variables

I have to solve the equality between 2 matrixes 12x12 containing a lot of symbolic variables and with which I perform inversion of matrix. There is only one unknown called "...
user avatar
0 votes
1 answer
390 views

Implementing Dirichlet BC for the Advection-Diffusion equation using a second-order Upwind Scheme finite difference discretization

i am implementing a Matlab code to solve the following equation numerically : $$ (\frac{\partial c}{\partial t} =-D_{e} \frac{\partial^2 c}{\partial z^2} +U_{z}\frac{\partial c}{\partial z}) $$ with ...
Ivan's user avatar
  • 1
5 votes
1 answer
129 views

Solving $AX+X^TB=C$?

Is there a name/standard algorithm to solve the following equation for $X$? $AX+X^TB=C$ Matrices $A$,$B$,$C$ are dense, diagonalizable, nearly singular, about $1000\times 1000$ in size. I've looked ...
Yaroslav Bulatov's user avatar
1 vote
0 answers
26 views

Multiplying by E[xy'] where only some statistics of xy' are known

(cross-posted on crossvalidated) For random variable $(x,y)$ in $\mathbb{R}^{d}\times \mathbb{R}^{d}$ and vector $v \in \mathbb{R}^d$, I need to perform the following matrix vector multiplication. $$T(...
Yaroslav Bulatov's user avatar
2 votes
1 answer
52 views

Solving MX=N where M is structured as a Gaussian 4th-moment tensor

I'm looking to solve numerically the following equation for $(d,d)$ variable $X$, in Einstein summation notation $$M_{ijkl}X_{kl}=N_{ij}$$ Where $M$ is a $(d,d,d,d)$ 4th-moment tensor of random ...
Yaroslav Bulatov's user avatar
1 vote
0 answers
58 views

Assume $AX = C$. How to determine which entry of $BX - D$ is non-negative?

Let $A,B$ be $n \times n$ matrices and $C,D$ be $n \times 1$ matrices. Moreover, all entries of $A,B,C,D$ are non-negative. Assume that there is a unique matrix $X$ that solves $AX = C$. My goal is ...
Akira's user avatar
  • 207
-1 votes
1 answer
166 views

Finding derivative of Matrix at different grid points using Finite difference methods/ Cholesky Factorization

I want to code this problem in MATLAB. It would be a huge help if someone can suggest to me how I can approach it. I need to solve the below-highlighted equation, I need ...
Sandeep Parameshwara's user avatar
1 vote
0 answers
249 views

implementation for coppersmith matrix multiplication

Is there any online implementation for the coppersmith matrix multiplication I have searched alot but can not find any? and if there is not any why is that Isn't this algotithm much faster than ...
bedo dan's user avatar
5 votes
1 answer
240 views

Solving $AXB + X\odot C = D$ matrix equation

Can anyone see a way to solve this equation efficiently? $$AXB + X\odot C = D$$ I tried a straightforward solution that involved vectorizing $X$ but that turned out too expensive for my application -...
Yaroslav Bulatov's user avatar
5 votes
3 answers
729 views

Maximize a function of an orthogonal matrix

I'm trying to write up a small code that, given a set of normal vibrational modes for a molecule, will convert them to localized vibrational modes. To do this I'm following the procedure from J. Chem. ...
Tyberius's user avatar
  • 1,023
8 votes
1 answer
188 views

Eigenvalue-like problem with coupled ODEs

I am looking at the following system of ODEs: \begin{array}{r}{\left[c_{2}(k)-\partial_{\tau}^{2}\right] \varphi_{2}\left(\tau \right)=f_{21}(\tau) \varphi_{1}\left(\tau \right)} \\ {\left[c_{1}(k)-...
KartMan's user avatar
  • 81
4 votes
1 answer
749 views

Mass Matrix and how to handle it (ODEs) - References

I'm interested in a good reference/paper about how to handle numerically a mass-matrix system as \begin{align} \mathbf{M}(t,y)\dot{y} =F(y,t) \end{align} I know that such a problem can be solved by ...
VoB's user avatar
  • 550
1 vote
1 answer
321 views

Solving linear system with matrix multiplication

When solving a linear system $Ax=b$ where $A=B^TCB$ do I need to form $A$ explicitly by two matrix-matrix multiplications or is there another more simple way? $C$ is a NxN matrix and not always ...
vydesaster's user avatar
2 votes
1 answer
340 views

Finding probability vectors from an implicit equation

I have $q$ $n$-dimensional vectors $\vec y_i$ and a matrix $\hat B$ of shape $n\times m$. I'm looking for $q$ $m$-dimensional vectors $\vec x_i$ such that: $\vec y_i=\hat B \vec x_i$ each vector $\...
Pawel's user avatar
  • 23
5 votes
1 answer
172 views

Generate approximately semi-orthogonal tall matrix approximately satisfying constraints

I have a set of matrices $\{(A_i,D_i)\}$ for $i\in\{1,\ldots,n\}$, where: Each $D_j\in\mathbb{R}^{S\times S}$ is diagonal, and every entry on the main diagonal is non-negative. Each $A_j\in\mathbb{R}^...
user3658307's user avatar
7 votes
1 answer
380 views

Least Squares with Dense-Block Diagonal Structure

I need to solve a least squares problem that takes the following form: $$p = \arg \min_{x}\Vert J V x - y \Vert_2, $$ where $J \in \mathbb{R}^{N \times N}$ is a general dense matrix, and $V \in \...
Spenser's user avatar
  • 73
4 votes
1 answer
516 views

How to solve the following Frobenius norm-minimization problem?

Background We know how to solve the following minimization problem $$ \min_{X} \lVert AX - B \rVert_F^2 $$ But what about the extended version? $$ \min_{X} \lVert A \begin{bmatrix} X & X^2 \...
ArtificiallyIntelligent's user avatar
-1 votes
1 answer
460 views

Gauss-Seidel method convergence

I am currently programming a code to find the equilibrium function that satisfies the poisson equation in 2D. In order to do this I use finite difference methods and the discrete equation I want to ...
Akerai's user avatar
  • 101
1 vote
1 answer
111 views

Invert a matrix only on a subset of variables / Compute the "equivalent circuit"

Suppose I have a complicatedly shaped conductor with inhomogeneous conductivity. The conductor is modeled using the Finite Element Method. The conductor has electrical contacts on both ends. Those ...
Michael's user avatar
  • 1,463
5 votes
2 answers
633 views

Compute $x = B^{-1}(2A+I)(C^{-1}+A)b$ without calculating matrix inverses

If $A, B, C$ are $n \times n$ matrices, where both $B$ and $C$ are nonsingular, and $b$ is a vector of length $n$, how would you compute the following without computing any inverses? $$x = B^{-1}(2A+...
Bob Marley's user avatar
3 votes
0 answers
132 views

Computing Algebraic Riccati inequality

In my Robust model control, I have got a couple of quadratic Riccati inequalities which need to be solved numerically on MATLAB. My question, Is there function on MATLAB can solve quadratic Riccati ...
Sam A's user avatar
  • 31
9 votes
1 answer
877 views

Matrix Balancing Algorithm

I have been writing a control system toolbox from scratch and purely in Python3 (shameless plug : harold ). From my past research, I have always complaints about ...
percusse's user avatar
  • 393
2 votes
1 answer
134 views

Solving system of related equations without completely recomputing LU decomposition for each equation

Let $\Sigma$ be positive definite and the $D_i$ positive diagonal. Let the $X_i$ be unknown square matrices. Consider the system of equations: $$(I+\Sigma D_i)X_i=\Sigma\hspace{5mm}\text{for}\...
Set's user avatar
  • 503
2 votes
3 answers
310 views

Eigenvectors of Black-box matrix

$\DeclareMathOperator{\diag}{diag}$ Consider the generalized eigenproblem $A\mathbf{x}=\lambda B\mathbf{x}$. When solving PDEs numerically (specifically, I am interested on finding the Dirichlet ...
brubeck's user avatar
  • 63
3 votes
1 answer
423 views

Convergence conditions of a stationary iteration method for linear systems

Recently, I obtain a linear system, $Ax = b$, where $A$ is a nonsingular, strictly diagonally dominant $M$-matrix. Then I also got a matrix splitting $A = S - T$, where $S$ is also a nonsingular, ...
Hsien-Ming Ku's user avatar
10 votes
1 answer
1k views

The fast, and The Backward-Stable (left) $3\times 3$ matrix inverse

I need to compute a lot of $3\times3$ matrix inverses (for Newton iteration polar decomposition), with very small number of degenerate cases ($<0.1\%$). Explicit inverse (via matrix minors divided ...
Sergiy Migdalskiy's user avatar
2 votes
2 answers
700 views

Solve $AX=B$ where $A$ is a skyline matrix

Solve a matrix equation of the type $AX=B$, where $A$ is an $n \times n$ symmetric matrix stored in the form of symmetric skyline matrix. With the solution given by Bill and some more research on ...
Chaitanya Krishna's user avatar
3 votes
0 answers
436 views

On solution of a class of discrete-time Lyapunov equation for systems with multiplicaitve noise

Let's consider the following equation $$X=F_{1}XF_{1}^{T}+...+F_{p}XF_{p}^{T}+C$$ where $p$ is an positive integer and $C$ is a known positive semidefinite matrix. If we augment $F=[F_{1}...F_{p}]$ ...
eolithr's user avatar
  • 31
3 votes
1 answer
157 views

Calculate 3x3 matrix to give lowest difference for data set

I'm building an application where I need to compare found data with the actual data it should be. I have 5 sets of data, each with 3 variables a,b,c. Let matrix A be a 3x1 matrix with data a,b,c ...
jHogen's user avatar
  • 33
7 votes
2 answers
206 views

Left and right eigenspaces of the product of Gramians

I solve the Lyapunov equations : $$ A W_C E^T + E W_C A^T + B B^T = 0 $$ $$ A^T W_O E^T + E W_O A + C^T C = 0 $$ to obtain $ W_C $ and $W_O$. My aim is to get the left and right eigenspaces of $W_C ...
Milind R's user avatar
  • 607
6 votes
3 answers
552 views

Computing an orthogonal matrix subject to linear constraints

I am looking for a method to solve the matrix equation $$ DXa = Xb $$ where $D\in \mathbb{R}^{n\times n}$ is diagonal, $a, b\in \mathbb{R}^{n}$ and $X$ is the unknown orthogonal $n\times n$ matrix ...
Victor Liu's user avatar
  • 4,480
12 votes
4 answers
1k views

Libraries for solving Lyapunov's equation

The following matrix equation $$B\Sigma + \Sigma B^T + C = 0$$ in $\Sigma$ $-$ for given $B$ and $C$ matrices $-$ appears in my work as a characterization of a covariance matrix. I have learned that ...
NRH's user avatar
  • 221