I was jsut messing around with my HCl that I bought and decided that ti would be neat to disolve an unreactive metal into HCl then put a more reactive metal in to make a precipitate of the first metal. Well my first metal was aluminum. I used pop can tabs. I disolved a whole bunch of them into the acide.. It turned dark gray and had sludge on the top... AlCl3 is suposed to be white not dark...
Aluminium chloride is white and its solutions are colorless. The grey stuff probably is due to impurities in the aluminium. Aluminium metal frequently is alloyed/mixed with other materials and it might be that these do not dissolve in the acid. After settling of the grey stuff you will end up with a clear and colorless liquid.
anyhow after that I put in a block of magnesium. even though i thought i had saturated the Hcl with Al, to my surprise the Mg bubbled H2. I confermed this by lighting it.
In water, you cannot make aluminium from its salts. When you add a less noble metal to a solution of a more noble metal, then you only get the more noble metal if there is no other ingredient in the solution, which is less electropositive than the more noble metal.
In your case you have:
H(+) / H2 --> less electropositive
H2O / H2 + OH(-)
Al(3+) / Al
Mg(2+) / Mg --> most electropositive
The most favorable conversion is the conversion of H(+) from the acid to H2. This is what you observe.
Suppose you have a solution of AlCl3 in water without acid and you add Mg, then you have the following situation.
H2O / H2 and OH(-)
Al(3+) / Al
Mg(2+) / Mg
Still, there is something above aluminium, being the water. Now the conversion of water to hydrogen and hydroxide ion is more favorable than conversion of aluminium ions to aluminium metal. This is also what you observe. After a day or so, the acid is (almost) used up, and your magnesium still slowly reacts. Now, water is converted to hydrogen and hydroxide ion while at the same time your magnesium is converted to Mg(2+) ions. The hydroxide in turn gives a precipitate with Mg(2+) ions and Al(3+) ions. This is the white stuff, which covers the magnesium, so you actually get Mg(OH)2 and Al(OH)3. These hydroxides are (almost) insoluble.
Now suppose you also had dissolved some copper sulfate in the solution, then you have the following situation:
Cu(2+) / Cu
H(+) / H2
H2O / H2 + OH(-)
Al(3+) / Al
Mg(2+) / Mg --> most electropositive
If you now add magnesium, then the most favorable conversion is from copper ion to copper metal. Copper is less active than acid. In practice you will see that the magnesium is covered by a brown copper layer and still there is some bubbling (in reality, chemical reactions almost always are accompanied by side reactions).
eventually the liquid cleared up to a whitish color. things were looking better. a day later I noticed precipitate forming on the Mg. I scraped it off with a knife. It was white with dark stuff in it. My guess is that this is crystalizd magnesium chloride with aluminum in it... Thing is, when I put this precipitate in a gallon of water, none of it disolves. Magnesium chloride should disolve in water... like 1 gram of this wont disolve into a gallon of water... So do I have a different compound here? Is my experiement flawed? I thought that it was pretty straight forward... 2 days later the Mg is still bubbling...
The white stuff is a mix of Mg(OH)2 and Al(OH)3, explanation, see above.
As you see, life is more complex. The keyword for understanding what you observed is "electropositive series". Google the internet or even better, read a good book on this subject.
Wilco
PS: Nice to see you being busy like this. This is the best way to learn something. Be careful and try to understand what really is going on.