Since Jon furthered the ColinEssex discussion, I will clarify a bit more to offer the USA side of this discussion.
We have fifty-one sets of laws that have to be considered - one federal and fifty state laws. Fortunately, as long as you don't actually live on a state line, only the federal and ONE of the sets of state laws need to be considered. However, there ARE folks in the city of Texarkana who live on the Texas / Arkansas border. And Kansas City straddles the states of Kansas and Missouri. I don't even want to contemplate how THAT works.
Just about every state allows armed self-defense in the case where you are confronted by an armed individual who appears to be aiming at you. It is always presumed that a agitated person with a gun has nefarious intent. It doesn't matter that the person's intent might have been robbery rather than actually attacking you. The immediacy of the situation doesn't give you time to decide, so you shoot and be done with it. However, the case is different when a person illegally enters your home.
In the USA, it is a matter of state-level rather than national-level law as to how you may react to a burglar who succeeds in getting into your home. Many states pass laws - and my home state of Louisiana is one of them - that automatically allows the home-owners to PRESUME that the burglar's presence IS a threat to their lives, and that the immediate nature of this circumstance does not give you time to determine the burglar's actual intent. Therefore, you MAY choose to shoot the burglar as a matter of self defense. This "shoot the burglar" law essentially gives the home-owner an instantly assumed legal defense even if it later turns out that the burglar was in fact unarmed.
Some states allow what is called the "castle" doctrine - "A man's home is his castle" - and therefore you may defend your castle. Some states take the variation of "stand your ground" - meaning that you don't have to run from a burglar when in your own home, you may defend yourself. There are other variations. Many states take a phrase from our Declaration of Independence and encode it into law, speaking of the "inalienable right to life, liberty" and then they finish with a few enumerated actions such as "acquiring property" and "conducting business." In other words, they take things from Common Law as being protected actions of the citizens. If you have an inalienable right to life, then their legal systems recognizes your right to defend that life if you feel threatened.
Equally, some states have a "must retreat if possible" law that severely limits the implied right of self-defense. Even Louisiana law doesn't allow me to chase the burglar who turns and runs out the door when I show up with a gun in hand. When the assailant is fleeing, the "exigent circumstances" are no longer assumed. Even the states with a "retreat if possible" law recognize that if you are in your own home that you might feel cornered and thus have no way to retreat.
The United States Constitution implies but doesn't actually state that there is a right of self-defense. However, a US Supreme Court case ("District of Columbia v. Heller") states that it is a recognized implied right. The right of self-defense is explicitly enumerated in some state constitutions, though not all. Other state and federal precedents exist that are generally consistent with the presumption of a right of self-defense.