Transactions question about bitcoin

Hi there. I have a question about transactions within the bitcoin blockchain. From what I understood in the lecture *
if you have some small UTXOs and you want to pay for a large transaction then the small UTXOs will be summed together then the summed amount will be sent and any change given like getting change in shop with you have a large note and you wish to buy a small item. So in this case you’ll see 2 transactions (one forward and then back)
But what if your UTXO is exactly the same amount as the next transaction you want to perform. So your UTXO is equal to your spent transaction in this case the blockchain only one transaction will appear?


In both cases it is a single transaction. The only difference will be in the transaction size and in the amount of inputs and outputs.

Here is an example of a transaction with 2 inputs being combine:

Here is an example of a transaction with 1 input:

Hope this helps you out. :smiley: