Let M be a matrix with rank of M is n−1. Then by applying elementary row operation we can make a row in M to be zero. Without loss of any generality, let us assume the last row will be zero by applying elementary row operations. Now note that the rank of ˆM obtained by removing the last row of M. That is,
M=[ˆMLast Row]
Now it is easy to note that rank(ˆM)=n−1, as rank of M is n and we can write the last row of M as a linear combination of other rows, that is, rows of ˆM. Without loss, let us also assume
rref(ˆM)=[In−1∗]rref(M)=[In−1∗0t0]
Let P be a product of elementary matrices such that
PM=[ˆM0t]
Now note that if we change the (n,n)th entry in PM from 0 to 1 and multiply P−1 from right side, that is, revering the elementary row operations, we will get our matrix M on which only single entry is changed.