First of all i denote $\{1,2,3,...,m\}$ by $[m]$


Let there be a collection of sets $\alpha=\{A\_{1},A\_{2},...,A\_{m}\}$ such $\bigcup\_{i\in[m]}A\_{i}\subseteq [n]$
Consider any function $f:\mathcal{P}([n])\rightarrow \mathbb{C}$ 


It is well known that $$f(\bigcup\_{i\in[m]}A\_{i})=\sum\_{i=1}^{m}(-1)^{i-1}\sum\_{I\subseteq[m],|I|=i}f(\bigcap\_{l\in I}A\_{l})$$


That formula is called a inclusion-exclusion principle


But what if we associate to $\alpha$ a matrix $\beta=(x\_{A\_{i}}(j))\_{i\in[m],j\in[n]}$


Where $x\_{A\_{i}}(j)=\begin{cases} 1 &\text{when } j\in A\_{i}\\0 &\text{otherwise } \end{cases}$



> 
> How to express inclusion-exclusion principle using operations on matrix $\beta$?
> 
> 
> 


By operation i mean for example adding, multiplying rows, columns, taking determinant etc.


In particular i am intrested in case when $f$ is probability measure P.


Here are the things i done in this case:
Consider binomiall and independent distribution over all the numbers from the set $[n]$. Probability that we pick an element $i$ is equal to $p$.


I noticed that $f(A\cap B)=P(A\cap B)=p^{|A\cup B|}$ (where $A$ stands both for set and an event to include set , same with $B$)


But how to use a matrix there?



Express inclusion-exclusion principle in terms of matrix operations
As darij grinberg noted, the inclusion-exclusion principle holds only if $f$ is additive over $[n]$ or, equivalently, is a (signed) measure over $[n]$, and then 
$$f(A)=\int x\_A\,df$$
for any $A\subseteq[n]$. 


Now, to get the inclusion-exclusion principle from properties of indicators $x\_A$ of sets $A$, write 
\begin{align}x\_{\bigcup\_1^m A\_j}&=1-\prod\_1^m(1-x\_{A\_j}) \\ 
&=\sum\_{i=1}^m(-1)^{i-1}\sum\_{J\in\binom{[n]}i}\prod\_{j\in J} x\_{A\_j} \\ 
&=\sum\_{i=1}^m(-1)^{i-1}\sum\_{J\in\binom{[n]}i}x\_{\bigcap\_1^m A\_j},
\end{align}
where $\binom{[n]}i$ is the set of all sets $J$ such that $J\subseteq[n]$ and $|J|=i$.  

Integrating now with respect to $df$, we get the inclusion-exclusion principle: 
\begin{align}f(\bigcup\_1^m A\_j)&=
\sum\_{i=1}^m(-1)^{i-1}\sum\_{J\in\binom{[n]}j}f(\bigcap\_1^m A\_j).
\end{align}


