1
$\begingroup$

Suppose I have an invertable $n \times n$ matrix, $M$, where certain entries are negative. Does there exist another invertible matrix, $P$, which i can multiply with $M$ to obtain a matrix will all positive entries?

And a followup:

Suppose I have some $n \times n$ matrix, $M$, where certain entries are negative. Does there exist another matrix, $P$, which i can multiply with $M$ to obtain a matrix will all positive entries i.e. $PM$ = abs($M$)? In cases where it does exist, how do i find it?

  • 0
    Is your matrix $M$ invertible?2012-03-11
  • 0
    Yes, edited the question thx.2012-03-11
  • 2
    If $M$ is invertible then I guess $P = M^{-1}$ would work...2012-03-11
  • 0
    OP, you're looking for $P$ such that $B = PM$. Now is $B = \operatorname{abs}(M)$ elementwise? Is $B$ related to $M$ or is $B$ just any matrix with all entries being positive?2012-03-11
  • 3
    You can take any invertible matrix which has all entries positive, say $B$, then if your $M$ is invertible, then set $P = BM^{-1}$.2012-03-11
  • 0
    yes, it would be ideal if B=abs(M) element-wise. also would there be a solution if M was non-invertable?2012-03-11
  • 1
    If you know $M$, then let $B = \operatorname{abs}(M)$ element-wise. Then $$P = BM^{-1}$$ will do since $PM = BM^{-1}M = BI = B$, which has all elements positive.2012-03-11
  • 0
    thanks, but what if M was non-invertable, could a pseudo-inverse help perhaps?2012-03-11
  • 0
    I think this problem would better be formulated as follows. Let $e_{ij}, 1 \le i,j \le n$ be a matrix such that the entry $(i,j)$ of $e_{ij}$ is $1$ and zero otherwise. The $n^2$ set of matrices $e_{ij}, 1 \le i,j \le n$ is a basis of ${\rm GL}(n)$. Then $$M = \sum m_{ij} e_{ij}$$ and we are looking for $P$ such that $$PM = \sum {\rm abs}(m_{ij}) e_{ij}.$$2012-03-11
  • 0
    @user996522 pseudo-inverse will help only if $A$ has orthogonal columns (resp. rows). Hence left (resp. right) inverse will get you to identity matrix.2012-03-11
  • 0
    If $M$ is not invertible then the answer may be negative. Take for example $$M=\begin{bmatrix} -1 & 1 \\0 & 0\end{bmatrix}.$$2012-03-11
  • 0
    @GiuseppeNegro nice example! For any $P = \begin{pmatrix}a & b \\ 0 & d \end{pmatrix}$, $PM = \begin{pmatrix}-a & a \\ 0 & 0 \end{pmatrix}$ which can't equal ${\rm abs}(M)$2012-03-11

2 Answers 2

2

Edit: as noted by Geoff Robinson, my solution does not meet the OP's requirement that the matrix $P$ should be invertible. As given below, $P$ is not necessarily invertible since ${\rm abs}(M)$ need not be invertible, even if $M$ is.

If $M$ is invertible, then matrix $P$ exists. For example, $$ P = {\rm abs}(M)M^{-1}$$ as I illustrated in my comments. But computationally, constructing $P$ in the trivial way (${\rm abs}(M)M^{-1}$) is funny because you already computed ${\rm abs}(M)$ in order to construct $P$.

If $M$ is non-invertible, then pseudo-inverse $M^{*}$ can help you in certain cases. For example, if the columns of $M$ are orthogonal, then left inverse $M^{*}M= I$ and $P$ can be constructed. Similarly if rows of $M$ are orthogonal, and right inverse is used.

0

If you want all entries of $PM$ to be positive, then all you have to do is to find an invertible matrix $X$ (of the same size) with all entries positive. Then take $P = XM^{-1}$ and we have $PM = X.$ There is such a matrix $X$. For example, Take $X = I +J,$ where every entry of $J$ is $1.$ Since $J$ is symmetric with trace $n$ and rank $1$, its eigenvalues are $n$ (with multiplicity $1$) and $0$ with multiplicity $n-1.$ Hence $X$ has determinant $n+1$, and is invertible with all entries positive.

  • 0
    In the comments, OP wants $PM = {\rm abs}(M).$2012-03-11
  • 0
    Well, that can't be done in general. For example, if we take $M = \left( \begin{array}{clcr} 1 & -1 \\1 & 1 \end{array} \right) $, then $M$ is invertible, but ${\rm abs}(M)$ is not invertible, so there is no such invertible $P$ with $PM = {\rm abs}(M).$2012-03-11
  • 0
    If $M$ is invertible, then $P = {\rm abs}(M)M^{-1}$ exists (and unique at least over fields of characteristic $= 0$). And for the example you had, take $P = \begin{pmatrix} 0 & 1 \\ 0 & 1 \end{pmatrix}$, then $PM = {\rm abs}(M)$.2012-03-11
  • 0
    But the OP wanted $P$ invertible, and that can't be done.2012-03-11
  • 0
    Ops. Sorry. I totally forgot that part about $P$ being invertible.2012-03-11