# 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".

46 questions
Filter by
Sorted by
Tagged with
94 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 ...
90 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 ...
76 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$$...
628 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$ ...
192 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 ...
1 vote
67 views

1 vote
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 ...
304 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 ...
105 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 ...
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 ...
341 views

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=... 1 vote 0 answers 77 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 ... 1 vote 1 answer 517 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 "... 0 votes 1 answer 342 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 ... 5 votes 1 answer 119 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 ... 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(... 2 votes 1 answer 51 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 ... 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 ... -1 votes 1 answer 159 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 ... 1 vote 0 answers 212 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 ... 5 votes 1 answer 236 views ### Solving AXB + X\odot C = D matrix equation Can anyone see a way to solve this equation efficiently?$$AXB + X\odot C = DI tried a straightforward solution that involved vectorizing X but that turned out too expensive for my application -... 5 votes 3 answers 668 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. ... 8 votes 1 answer 155 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)-... 4 votes 1 answer 596 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 ... 1 vote 1 answer 248 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 ... 2 votes 1 answer 339 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 \... 5 votes 1 answer 166 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}^... 7 votes 1 answer 375 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 \... 4 votes 1 answer 504 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 \... -1 votes 1 answer 410 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 ... 1 vote 1 answer 102 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 ... 5 votes 2 answers 502 views ### Computex = 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+... 3 votes 0 answers 119 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 ... 9 votes 1 answer 840 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 ... 2 votes 1 answer 129 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}\... 2 votes 3 answers 299 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 ... 3 votes 1 answer 419 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, ... 10 votes 1 answer 812 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 ... 2 votes 2 answers 671 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 ... 3 votes 0 answers 428 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}]$... 3 votes 1 answer 148 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 ... 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 ...
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 ...
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 ...