Wikipedia:Reference desk/Archives/Mathematics/2007 December 4

= December 4 =

Numbers in matrices
Hello everyone,

Some friends of mine made me notice some amusing fact about matrices and determinants :

Choose any number and multiples of it.

Put these numbers in a matrix, treating each digit as an entry (enough numbers to make a square matrix).

Then the determinant of that matrix is a multiple of the original number. (Doesn't have to be base 10)

Example :

Taking original number 174, multiples 348,522 and 870

$$ \left| \begin{array}{ccc} 3 & 4 & 8 \\ 5 & 2 & 2  \\ 8 & 7 & 0  \end{array} \right| = 3\left| \begin{array}{cc} 2 & 2 \\ 7 & 0  \end{array} \right| -4 \left| \begin{array}{cc} 5 & 2 \\ 8 & 0  \end{array} \right| +8 \left| \begin{array}{cc} 5 & 2 \\ 8 & 7  \end{array} \right| =3(-14)-4(-16)+8(35-16) =-42 + 64 + 152 = 174 $$

and 174 is a multiple of 174.

So, my question is, how come this works ? What are the properties of determinants involved here that make this work ? And does this apparently innocent result hide something of greater importance ?

--Xedi 18:19, 4 December 2007 (UTC)


 * This is easy to understand using the properties of determinants. If you add a scalar multiple of one column of a matrix to another column, the determinant is unchanged. So we can add 10 times the middle column to the right column:
 * $$\left[\begin{array}{ccc}

3 & 4 & 48 \\ 5 & 2 & 22  \\ 8 & 7 & 70  \end{array}\right]$$
 * and then add 100 times the left column to the right column:
 * $$\left[\begin{array}{ccc}

3 & 4 & 348 \\ 5 & 2 & 522  \\ 8 & 7 & 870  \end{array}\right]$$
 * and this matrix has the same determinant as the original matrix. There's only one more property of determinants we need to use: if you multiply any column by a scalar, the determinant is also multiplied by that scalar. So recognizing that the right column now consists of multiples of your original number, we can write the determinant as
 * $$\left|\begin{array}{ccc}

3 & 4 & 8 \\ 5 & 2 & 2  \\ 8 & 7 & 0  \end{array}\right| = 174 \left|\begin{array}{ccc} 3 & 4 & 2 \\ 5 & 2 & 3  \\ 8 & 7 & 5  \end{array}\right|$$
 * which is obviously a multiple of 174 because the determinant on the right is an integer. —Keenan Pepper 19:10, 4 December 2007 (UTC)


 * In other words, you can restore the original numbers in one column by multiplying by the matrix
 * $$\left[\begin{array}{ccc}

1 & 0 & 100 \\ 0 & 1 & 10 \\ 0 & 0 & 1   \end{array}\right]$$
 * which has unit determinant. It's simple to generalize this to higher numbers of digits and different bases. —Keenan Pepper 19:16, 4 December 2007 (UTC)


 * One way to see this is to ignore the requirement that the entries must be digits. Just start out with any three (or n) numbers, x,y,...,z as the first row.  Since the property you mention (being a multiple of some particular number) is not affected by being multiplied by integers, you can replace x,y,...,z with any multiple without changing the result.  Let's just keep it as x,y,...,z.  Now when you did the multiplications for your matrix, you did not just multiply x,y,...,z by some number, you also grouped the new answer into "digits".  In other words, for (X,Y,...,Z) = a*(x,y,..,z), you replaced X,Y,...,Z by X+1,Y-10,...,Z when you noticed a carry in the "Y" position.  Determinants (up to integer multiples) are not affected by adding an integer multiple of one row to another.  So we can simply subtract back off X,Y,...,Z from that row without affecting the truth of the statement.  Similarly determinants are not affected (up to integer multiples) by rearranging the rows.  Subtracting and rearranging, one finally gets a matrix like this:
 * $$\begin{bmatrix} x&y&\ldots&\ldots&z\\ 1 & -10 & 0 & \ldots & 0 \\ 0 & 1 & -10 & \ldots & 0 \\ \vdots & & & & \vdots \\ 0 & 0 & \ldots & 1 & -10 \end{bmatrix}$$
 * whose determinant (up to integer multiples) is $$x\cdot10^n + y\cdot10^{n-1} + \ldots + z$$, or one gets a matrix with a row that is all zeroes and whose determinant is 0, also a multiple of $$x\cdot10^n + y\cdot10^{n-1} + \ldots + z$$. Of course you can replace 10 with any constant.
 * At any rate, while writing this, I notice from the edit conflict that User:Keenan Pepper has also given a similar answer working in the other direction, so I suspect this is more than enough. JackSchmidt 19:23, 4 December 2007 (UTC)

Thanks a lot, it's perfectly clear. Couldn't have wished for more. --Xedi 19:57, 4 December 2007 (UTC)

Why dont i get this?
I will start off by saying that this is not a homework question. this is one that the teacher did with us in class and i dont understand it.

Now: I was given the function ƒ(x)=|x+2|-15, and ƒ(x-6)=__. The way i see it, if one was to insert the (x-6) in for the original x, than x=x-6 must be true, which means x=-6 is true. but its not because -6-6≠-6. so how does this work?the juggreserection 20:59, 4 December 2007 (UTC)


 * Am I right in thinking you are given ƒ(x)=|x+2|-15 and need to find ƒ(x-6) ?
 * If so, recall what f(x) means : it is the value the function f takes at x.
 * Let's take a second function g(x) to explain :
 * Let g(x) = x2, then g(3) = 32 = 9
 * In the same way, g(y) = y2 or g(rabbit) = (rabbit)2.
 * So you also have g(x-6)= (x-6)2 = x2-12x+36
 * Hope that helps --Xedi 21:12, 4 December 2007 (UTC)
 * The question was about something slightly deeper, which we are so used to doing without thought that we don't even realize there is something problematic. We know that $$g(x)=x^2$$ for any x. In particular, we "know" it is true for x equal to $$x-6$$, so $$g(x-6)=(x-6)^2$$. But how can x be $$x-6$$? -- Meni Rosenfeld (talk) 21:16, 4 December 2007 (UTC)
 * Yes, indeed, when we use f(x) and then f(x+1), we don't think about x and x+1 being the same thing. $$f(\square)=|\square+2|-15$$ and we put whatever we want in the square. --Xedi (talk) 21:38, 4 December 2007 (UTC)


 * [ec]That's indeed a bit tricky, because we use the same letter x to mean different things at different times. This can be clarified by using another letter instead. For example, $$f(x) = |x+2|-15$$ is of course the same as $$f(y) = |y+2|-15$$. Now we can use $$y=x-6$$ to have $$f(x-6)=|x-6+2|-15=|x-4|-15$$. Is this clearer? -- Meni Rosenfeld (talk) 21:13, 4 December 2007 (UTC)


 * My belated two cents: The confusion arises because function notation looks like a normal equation, but is in fact a different thing entirely. If we have x+y=4 and x=y, we can replace the first x with a y (or vice versa), but only because we know they're equal. In the example f(x)=x+1, we are using x merely as an example. As pointed out above, f(rabbit)=(rabbit)+1 is still the same function. So, when you replace x with x-6, you are not saying that they are equal, you're simply replacing the example with what you actually want to work out. D  aniel  (‽) 21:55, 5 December 2007 (UTC)


 * Another way of looking at it is that the original problem, as given by the teacher, has a missing universal quantifier. When we say "ƒ(x) = |x+2|-15", what we really mean, by convention, is that "ƒ(x) = |x+2|-15 for all x" — but to be really rigorous, that "for all" should be explicitly written out.  If we did that, we'd see immediately that x in that statement is a bound variable, and is not the same x as the one in "ƒ(x+6)", which is outside the scope of the quantifier, and therefore unbound; in particular, since the x in "ƒ(x) = |x+2|-15 for all x" is bound, we could (and should, for clarity) replace it with any other symbol, such as "ƒ(z) = |z+2|-15 for all z", "ƒ(ξ) = |ξ+2|-15 for all ξ" or even "ƒ(♠) = |♠+2|-15 for all ♠", and it would still mean the same thing.  (From a programming viewpoint, you could think of the x in the definition of ƒ(x) as being local to the function, but it's not quite the same thing.)


 * Of course, they probably don't usually teach predicate logic or variable binding in school, at least not at the level where they're teaching about functions like the one in the example given. This is probably a good thing, since it would probably just confuse most students at that stage — but it's also true, as we've seen here, that not teaching about it can also cause confusion.  At the very least, it would've been less confusing if the teacher had used different letters for the two variables, giving the problem as something like "if ƒ(y)=|y+2|-15 (for all y), then what is ƒ(x-6)?".  —Ilmari Karonen (talk) 00:33, 8 December 2007 (UTC)