There is no way to prove in the protocol that two address belong in the same wallet when you send from address A to address B in your wallet. Of course, if you are using some kind of online wallet they do know, but I'm assuming you are using a full one.
However, there can be clues that combined can be quite definitive.
1. Clues when you send the transaction
However, depending on the amount in address A, sending all funds to B with no change could be a clue that both belong to the same person. This is not a problem if you are sending a round amount like 1 BTC, but if you are sending 0.82421871 BTC and there is no change it is weird unless you are sending all your funds to donate or pay for something without a fixed price. It is the same if you send from A a round amount to another address and B gets a very weird amount.
2. Clues after the original transaction
- Spending from both addresses in the same transaction. This is no proof because there are ways to build a transaction with inputs from two wallets, but it is extremely rare.
- Sending funds between the two addresses frequently, specially if you do it both ways (from A to B and from B to A). This could happen with two parties that work a lot together, but it is a clue of some relation.
- Sending from both addresses at the same time, even if it is to different addresses (you send two transactions, one from A and another from B, that get to the same block long after you did the original one). It can be a coincidence, but it is one more signal.
3. IP address clue
This is extremely unlikely, but if you connect to a rogue node that records your IP address when you send from A to B and then you connect to that same rogue node (or another one acting in coordination) when you send from B to somewhere else, it would have the same IP address associated to both addresses. You could avoid this by using Tor or changing your IP address in some other way.
possible duplicate of How anonymous are Bitcoin transactions?
– Stephen Gornick – 2013-02-04T03:40:35.173I noticed that there is nothing on that page about figuring out that certain addresses are in the same wallet, despite the fact that there has been specific research on that topic. Perhaps this question could be rephrased to more specifically address that topic? Or if we want it all to go on that other one, maybe someone (KoKo or anyone else) could start a bounty on that question for an answer detailing this point. Personally I favour rephrasing this question since it is an important topic and really much more specific than "how anonymous are transactions". Any feedback on this KoKo? – eMansipater – 2013-02-08T05:48:49.680