# Extending Euler's Formula for Connected Planar Graphs

I am trying to figure out how to extend Euler's formula, n - e + f = 2, to contain a connected component denoted k. I am new to graph theory so I am not sure if the way I got there is correct or if there is a better way to show it.

I started by converting a regular graph into a connected one. I inserted e = e + k - 1 so that each new edge would connect two components in a graph and I got n - e + f = k + 1 which I know is the right answer. Is there a better/easier way to show how Euler's formula can contain a connected component?

Assume (without loss of generality) that all connected components share the same "outer face". If we don't count the outer face, $n_i-e_i+f_i=1$ for each connected component. So when we sum the values for each of the $k$ connected components, plus the outer face, we get $n-e+f=k+1$.