There are many ways to compare.
I would even go so far as to say they are similar.
Science aims to understand the laws of nature, in order to understand our place and also to create new and better ways of living. Science also makes assumptions about the universe in order to give structure to their techniques and avoid undesirable results. For example scientists who study mathematics believe that a number cannot be infinitely large, and that things that cannot be measured don't exist. These assumptions they call theories.
Magic practioners, particularly those who practice cermonial magick or Wicca also aim to understand their place in the world and through magic, they study how the universe works and how they can improve their lives and avoid undesirable results. They also make assumptions that create a structure to work in. One assumption that magic practioners make is that some chanelled information came from reliable spirits. I'm talking about people like Madame Blavatski, who is one of the founders on modern magick and spirituality.
Another way to compare is like you said, laws. There are specific laws that we can clearly see in action in both scientific and magickal communities. The 3rd law of motion which states every action has an equal and opposite reaction can be likened to Karma. Another set of laws that is shared by magic practitioners and scientists are the laws surrounding vibration.
There is a set of laws called the Hermetic Laws which have been handed down to magic practioners through the ages. Said to have been recorded in ancient times and translated most recently by "three initiates" of magic in 1912 . Most of These are, remarkably, almost identical to modern scientific laws on comparison. The Hermetic Laws have even predicted laws that were later discovered. Almost all magick is practiced in line with these laws.
So you can safely say that magic and science share an ancestor. For thousands of years they were the same thing. It was only in recent years that we have been developing them "separately." Alchemy was one of the last children of that era, and it was very important in the birth of both chemistry and ceremonial magick.
I hope that answers your question!
If not, maybe clarify your question further?