Therefore, the mere concept of lawbreaking is insufficient for defining sin, since sin does not need to reference a command in order to exist or be described. In light of that, let me suggest, as I have before, that sin is nothing more than the exertion of will contrary to the will of God. A command from God would certainly invoke such a definition, but then too would any awareness of what God's will was, whether it came through conscience, conviction or comprehension. Really, will exerted presumptiously, without regard to God, could invoke a charge of sin, even if done in complete ignorance of God's will.
Now, the Bible does say that sin is not imputed, or reckoned against one's record, where there is no law. There must be some distinction that God maintains between knowingly transgressing and ignorantly transgressing his will. Yet, as is clearly stated in the Word, death has spread to all humankind because all humans sin, even though many have had not so much as an inkling of the law. So, even if sin is not reckoned to one's account apart from the law, it still leads without exception to the penalty for sin which is death.
A child reaching for a flame, may have had no reason to believe mom or dad did not want her to do such a thing, but may nonetheless be greeted with a quick smack on the fingers as she tries to do so. She won't be punished further as she might have been had she known better, but she did receive a penalty regardless! Discovering that something is against God's will after the fact doesn't alter that it was against his will before. In other words, sin does not require the offense to be an overtly realized transgression on the part of the offender in order to be sin.
If one knows God's will, or if one merely suspects what may be God's will, or if one is completely oblivious to God's will concerning any willful exertion, that one sins by taking a course contrary to God's whether in word, deed, or thought. Of course, if all occurs according to God's will (as in determinism), it follows that there is and could be no sin. Since it is scripturally clear that sin does exist, it is also quite clear that stuff happens that God did not will. Sin is stuff that is not "his".
Therefore, sin is an unfortunate consequence of freewill. Without freewill sin would not and could not occur, but then neither would love nor the image of God exist.