<blockquote>
  <p>why some of transactions have one input and one output?</p>
</blockquote>

<p>A bitcoin transaction can have many inputs and many outputs. Bitcoin has a transaction oriented logic, where amounts are transferred from previous transactions. As an example (neglecting the fees): to be able to spend 1 bitcoin, when the  wallet has 2 previous tx with amounts of 0.5 BTC, then a new tx is created with two inputs. Same logic would apply, if 4 previous tx existed, each @0.25 BTC. Then a tx with 4 inputs would be created. 
For the outputs: you can create tx with one or more outputs. E.g. faucets pay to many outputs, instead of creating single transactions - this saves on the fees.</p>

<blockquote>
  <p>They don't have any change transaction?</p>
</blockquote>

<p>If you are not the owner of a wallet, you cannot know, which is the "change". Normally you have an output address, and a return address (for the change, like in the second example of the screen shot). The transactions move from one pubkey to another pubkey address, and there we cannot see, which addresses belongs to the user's wallet, and which might be the change address. With this said, there are some activities to try to link addresses to real users. They create diagrams, and try to see the flow of tx, and derive the information. But when using addresses only once, you wouldn't loose your privacy... </p>

<blockquote>
  <p>If any transaction has two output, the second one is change
  transaction?</p>
</blockquote>

<p>not necessarily. I can send a transaction with 0.5 BTC to my brother, and 0.5 BTC to my sister. So there would be no change address. </p>

<blockquote>
  <p>can we see fee transactions in output address?</p>
</blockquote>

<p>hmm, no... Transaction fee is the difference between summary of input values and summary of output values. A usual case: you have one BTC, you send 0.5 to your brother, you send to your change address 0.4995, and the diff is the fees, which go to the miners. </p>

<blockquote>
  <p>Are multiple addresses in input part related to each address in wallet
  that has bitcoin?</p>
</blockquote>

<p>Not necessarily. The bitcoin network doesn't know about wallets, and its belonging addresses - this is a layer to make it more comfortable for the endusers. The bitcoin network works with transactions, moving funds from address(es) to address(es). No wallet information is included. So multiple input parts can belong to different wallets. </p>

<p>A good overview of <a href="https://en.bitcoin.it/wiki/Transaction" rel="noreferrer">transactions is here</a>, and of course in Andreas' book "Mastering Bitcoin", which is also <a href="http://shop.oreilly.com/product/0636920049524.do" rel="noreferrer">online available</a>.  </p>

CC BY-SA 3.0
2018-04-16T12:44:33.213Z
thanks for your useful and complete answer. Would you please explain transaction scripts too?
Mahla
CC BY-SA 3.0
2018-04-16T14:32:09.087Z
There is a special tag [script] in the forum here, which has many related questions. E.g.here: https://bitcoin.stackexchange.com/questions/69062/why-does-bitcoin-uses-a-script-language/69077#69077 or here: https://bitcoin.stackexchange.com/questions/69062/why-does-bitcoin-uses-a-script-language/69077#69077. have a Look, search a bit in the forum, and feel free to raise your next question as a separate thread. It might also be interesting for other readers!
pebwindkraft
CC BY-SA 3.0
2018-04-16T10:13:37.203Z
2018-04-16T10:13:37.203Z
pebwindkraft
<p>I was checking transactions in blockchain.info. I have some questions about transaction information about input and output addresses. </p>

<p>block address:
<a href="https://blockchain.info/address/1NHv6qBxu6haWj8rqeLqw9eyJqm4JT26R6" rel="noreferrer">https://blockchain.info/address/1NHv6qBxu6haWj8rqeLqw9eyJqm4JT26R6</a></p>

<ol>
<li>why some of transactions have one input and one output? They don't have any change transaction?</li>
<li>If any transaction has two output, the second one is change transaction?</li>
<li>can we see fee transactions in output address?</li>
<li>Are multiple addresses in input part related to each address in wallet that has bitcoin?</li>
</ol>

<p><a href="https://i.sstatic.net/Y6jaK.png" rel="noreferrer"><img src="https://i.sstatic.net/Y6jaK.png" alt="enter image description here"></a></p>

<p>and one more question about transaction scripts:</p>

<p>what is input and output script? do wallets produce them? how we can use them?</p>

<p><a href="https://i.sstatic.net/80mcV.png" rel="noreferrer"><img src="https://i.sstatic.net/80mcV.png" alt="enter image description here"></a>
I'm new in bitcoin and I appreciate your clear explanations...</p>

<transaction-input>
multiple input and output addresses in bitcoin transactions
Mahla
# multiple input and output addresses in bitcoin transactions

(Asked by: username_0 on 2018-04-16)

I was checking transactions in blockchain.info. I have some questions about transaction information about input and output addresses.

block address:
<https://blockchain.info/address/1NHv6qBxu6haWj8rqeLqw9eyJqm4JT26R6>

1. why some of transactions have one input and one output? They don't have any change transaction?
2. If any transaction has two output, the second one is change transaction?
3. can we see fee transactions in output address?
4. Are multiple addresses in input part related to each address in wallet that has bitcoin?

[![enter image description here](https://i.sstatic.net/Y6jaK.png)](https://i.sstatic.net/Y6jaK.png)

and one more question about transaction scripts:

what is input and output script? do wallets produce them? how we can use them?

[![enter image description here](https://i.sstatic.net/80mcV.png)](https://i.sstatic.net/80mcV.png)
I'm new in bitcoin and I appreciate your clear explanations...

**Tags:** transaction-input


---

## 1 answers

### Answer by username_1 on 2018-04-16. Score: 12 | Accepted answer

> why some of transactions have one input and one output?

A bitcoin transaction can have many inputs and many outputs. Bitcoin has a transaction oriented logic, where amounts are transferred from previous transactions. As an example (neglecting the fees): to be able to spend 1 bitcoin, when the wallet has 2 previous tx with amounts of 0.5 BTC, then a new tx is created with two inputs. Same logic would apply, if 4 previous tx existed, each @0.25 BTC. Then a tx with 4 inputs would be created.
For the outputs: you can create tx with one or more outputs. E.g. faucets pay to many outputs, instead of creating single transactions - this saves on the fees.

> They don't have any change transaction?

If you are not the owner of a wallet, you cannot know, which is the "change". Normally you have an output address, and a return address (for the change, like in the second example of the screen shot). The transactions move from one pubkey to another pubkey address, and there we cannot see, which addresses belongs to the user's wallet, and which might be the change address. With this said, there are some activities to try to link addresses to real users. They create diagrams, and try to see the flow of tx, and derive the information. But when using addresses only once, you wouldn't loose your privacy...

> If any transaction has two output, the second one is change
> transaction?

not necessarily. I can send a transaction with 0.5 BTC to my brother, and 0.5 BTC to my sister. So there would be no change address.

> can we see fee transactions in output address?

hmm, no... Transaction fee is the difference between summary of input values and summary of output values. A usual case: you have one BTC, you send 0.5 to your brother, you send to your change address 0.4995, and the diff is the fees, which go to the miners.

> Are multiple addresses in input part related to each address in wallet
> that has bitcoin?

Not necessarily. The bitcoin network doesn't know about wallets, and its belonging addresses - this is a layer to make it more comfortable for the endusers. The bitcoin network works with transactions, moving funds from address(es) to address(es). No wallet information is included. So multiple input parts can belong to different wallets.

A good overview of [transactions is here](https://en.bitcoin.it/wiki/Transaction), and of course in Andreas' book "Mastering Bitcoin", which is also [online available](http://shop.oreilly.com/product/0636920049524.do).

> **Comments:**
> **username_0**: thanks for your useful and complete answer. Would you please explain transaction scripts too?  
> **username_1**: There is a special tag [script] in the forum here, which has many related questions. E.g.here: https://bitcoin.stackexchange.com/questions/69062/why-does-bitcoin-uses-a-script-language/69077#69077 or here: https://bitcoin.stackexchange.com/questions/69062/why-does-bitcoin-uses-a-script-language/69077#69077. have a Look, search a bit in the forum, and feel free to raise your next question as a separate thread. It might also be interesting for other readers!  

---

