A Multi signature transaction is where N public keys are set with condition that at least M of those are required for a signature.
At the moment the Bitcoin protocol limits the number of M and N to 15. These are generally written as M-of-N transactions where N is the total number of keys and M are the number of signatures required to unlock the transaction and spend it.
These transactions are very useful for businesses where two are needed to sign off on a particular transaction or even as a joint account where the format between a couple would be set as 1-of-2 – or where either of the couple can use the funds.
If a 2-of-3 multisignature condition is set – then any two key signature combinations of the three keys can unlock the funds. The Locking and Unlocking scripts are shown below:
<ScriptPubKey>=2 <Public Key A> <Public Key B> <Public Key C> 3 OP_CHECKMULTISIG
<ScriptSig>= <Signature1><Signature2>or any permutation of Sig1,2,3
When this is executed the result, if the conditions is met, is equal to one and the transaction is verified and will be propagated throughout the Bitcoin network.
Click here to learn how to create a multi-signature wallet.