1
$\begingroup$

I'm looking to understand how a method of balancing chemical equations using the null space vectors of a row augmented matrix works (the method is outlined in detail in the following paper).

https://arxiv.org/ftp/arxiv/papers/1110/1110.4321.pdf

I understand how to do the process and I understand why the null space vector would give me the desired coefficients. However, I don't understand how this augmentation procedure produces the null vectors. Why does adding a number of rows equal to the nullity, such that the rows form an identity submatrix in the right corner, give the null space vectors of the original matrix upon inversion? In the paper, they don't make it clear why this procedure produces the null space vectors.

EDIT: Here is the procedure up to where I'm encountering problems.

(a) Construct a chemical-composition matrix for the chemical-reaction equation.
(b) Determine the nullity, or dimensionality, of the matrix null space of the chemical- composition matrix.
(c) Augment the matrix with a number of rows equal to the nullity number. (My Note: the rows should form an identity submatrix in the bottom right corner)
(d) Compute the matrix inverse of the augmented matrix by using the built-in functions of a scientific calculator or computer spreadsheet program.
(e) Extract the null-space basis vectors from the inverted matrix. (The vectors will be the columns at the far right of the inverted matrix; the number of columns included—0, 1 or more—should equal the nullity of the row-echelon matrix.) This defines the null space of the original chemical-composition matrix!" (emphasis mine)

What I currently don't understand is how "e" follows from "c" and "d". Why does augmenting as detailed in "c" and inverting as detailed in "d" give the null space vectors of the original matrix as is stated in "e"?

  • 0
    It would be helpful if you included the relevant parts of the paper in the body of your question. External links can go stale.2017-02-24
  • 0
    I've edited my question to include the paper's summary of the procedure.2017-02-24
  • 0
    The problem is that “e” doesn’t follow from “c” and “d” in general. Take for example the matrix $\pmatrix{1&0&0\\0&0&1}$. Its nullify is 1, but the augmented matrix is singular. The paper has some other flaws, such as not explaining what you should do if the result of `MDTERM` is less than the number of rows, in which case you won’t end up with a square matrix after augmenting. It would appear that the matrices involved have some some tacitly assumed properties that allow the described technique to work.2017-02-25
  • 0
    @amd Looking at the matrix you wrote, I realize there is at least one assumption for the matrices based on representing chemical reactions. A column couldn't be all zeros because that would imply from the start that this compound had no relationship with the reaction. My understanding is that if MDETERM (or the number of nonzero rows in the reduced row echelon form) is less than the number of rows, you would just get a larger nullity. I guess I might have to delve deeper into the references for the paper and see if the assumptions this null space method requires are described more rigorously.2017-02-25
  • 0
    Use $\pmatrix{1&1&1\\0&0&1}$, then. The problem with both is that the columns are in the “wrong“ order for the augmentation to produce a nonsingular matrix. This is obvious for these two matrices, but not so obvious for something like $\pmatrix{2&2&2\\4&4&7}$.2017-02-26
  • 0
    As for the second issue, the gist of the paper seems to be that you can use something other than row-reduction to determine nullity and then invert the original matrix augmented by extra rows, but this leads to a non-square matrix if the original doesn’t have full rank. If you’re going to row-reduce, on the other hand, you can read a basis for the null space from the RREF matrix, so there’s not really any reason to do anything else at that point.2017-02-26
  • 0
    I think I see now why they are solving it this way.2017-02-28
  • 0
    I think I see now why they are solving it this way. In @Dude 's response to another question (http://math.stackexchange.com/questions/598508/basis-of-a-null-space-of-a-matrix), he mentions that if you "pad" the RREF matrix with rows as described in this paper, you get the the basis vectors as the columns in which the added rows have ones. In this paper, they pad first and take then take the inverse, which seems to be equivalent. I think the choice to do it this second way (speculating) is that they intend for this to be done on a calculator and its easier to read off a result if you pad first.2017-02-28
  • 0
    Unfortunately, there’s no way to know a priori whether or not padding the original matrix will get you something invertible. If you get a singular matrix after padding, you don’t know if it was because the columns were in a bad order, the rows are linearly dependent, or ...? The trick is kind of neat, and I can explain why it works *when it works*, but the examples in the paper are all contrived so that it does. Unless there’s something about the way these matrices get set up that ensures that they’re in the nice form, success is entirely accidental.2017-02-28
  • 0
    For instance, even if the original matrtix has full rank, which appears to be a requirement, you could still end up with a singular matrix after padding, as in my examples above, but without row-reducing or spotting something obvious in the matrix, you won’t know if a simple column swap would fix it.2017-02-28
  • 0
    It might help to know why it works when it works. I might be able to piece together from that why it would have to work for the specific case of a chemical reaction.2017-03-01

1 Answers 1

2

The trick described in the paper is handy, but it doesn’t work in general. Obviously, the original matrix $M\in\mathbb R^{m\times n}$ must have more columns than rows. In addition, it must have full rank. If not, you’ll end up with a singular matrix after padding, but with no good way to tell a priori which row(s) are redundant. There’s a more subtle constraint as well. If the padded matrix is nonsingular, then we have $$M_{\text{pad}}^{-1}=\left[\begin{array}{c|c}A & B \\ \hline 0 & I_{n-m}\end{array}\right]^{-1}=\left[\begin{array}{c|c}A^{-1} & -A^{-1}B \\ \hline 0 & I_{n-m}\end{array}\right],\tag{*}$$ which implies that the first $m$ columns of $M$ must be linearly independent. Since $M$ has full rank, this could be ensured by permuting its columns, but as with rank deficiency, there’s in general no way to tell a priori what needs to be swapped.

From the fact that the upper-right block of the product of the two matrices in (*) is zero, we can see that the right-hand columns of the inverse matrix are all elements of $\ker M$ and so in fact form a basis for the kernel. It would be interesting to know whether there’s some characteristic of chemical equations that ensures the above conditions, or the authors simply got lucky with their examples.

  • 0
    After looking over the paper for much longer than I probably should have, it seems that author is assuming characteristics of the matrices, which leads to leaving off instructions for the inversion. It also seems that the inversion is unnecessary to begin with because, as you noted and he shows in the paper, we wind up with the null space vectors just by taking the RREF of the matrix and then augmenting (which I assume can only work if we assume that augmentation also overwrites all zero rows when they are present rather than adding a whole. Otherwise, the method fails for simple reactions).2017-03-02
  • 0
    @Tyberius IIRC, the paper does mention that you might have to delete trailing zero rows and also insert some rows into the rref if the pivots don’t line up on a neat diagonal. That padding is basically the same as the last variation in my description [here](http://math.stackexchange.com/q/1521264/265466) of how to read a kernel basis directly from the rref. You might also be interested in [this related question](http://math.stackexchange.com/q/1612616/265466).2017-03-03
  • 1
    @Tyberius I think the real take-away from this paper is the general technique of using a null space to balance the equation. If the inversion trick for finding the null space works, great, but there are other, more reliable options for that.2017-03-03