Alchemy is basically magic but the precursor to science was alchemy. Issac Newton was considered "The Last Great Magician": He was an alchemist, because as all alchemists, his ultimate goal was to discover the perfect element, the Philosopher's Stone, which would allow him to transmute lead into gold. Alchemy is really the conversion of base elements into other elements, but since base elements can't just be changed in that sort of way, it's magic because it's not really possible like that. The difference between normal magic and alchemy is that alchemy works on the rules of normal reality, ie. gravity, elements, it can't create phenomena that does not exist in the real world. Whereas magic can just make something without any scientific basis, ie. create energy. Alchemists like Roy Mustang take the oxygen in the air and use transmutation to make it fuel superheated gas, and thus he has a big ball of fire coming your way. Elric takes the metal in the train and transmutes it into a cannon completely comprised of the iron and graphite, etc. in the steel of the train. He doesn't just divinate it out of nothingness, he needs the real elements that make sense in science, but his transmutation of the elements without tools or equipment is what makes alchemy more like magic than science. It did actually exist as a precursor to science, but not in the way that it does in FMA. They'd use pipes and flasks and base elements, trying to change them into something else, which of course didn't really work for the most part.