Mason's gain formula (MGF) is a method for finding the transfer function of a linear signal-flow graph (SFG). The formula was derived by Samuel Jefferson Mason, whom it is also named after. MGF is an alternate method to finding the transfer function algebraically by labeling each signal, writing down the equation for how that signal depends on other signals, and then solving the multiple equations for the output signal in terms of the input signal. MGF provides a step by step method to obtain the transfer function from a SFG. Often, MGF can be determined by inspection of the SFG. The method can easily handle SFGs with many variables and loops including loops with inner loops. MGF comes up often in the context of control systems, microwave circuits and digital filters because these are often represented by SFGs. Formula The gain formula is as follows: where: Δ = the determinant of the graph. yin = input-node variable yout = output-node variable G = complete gain between yin and yout N = total number of forward paths between yin and yout Gk = path gain of the kth forward path between yin and yout Li = loop gain of each closed loop in the system LiLj = product of the loop gains of any two non-touching loops (no common nodes) LiLjLk = product of the loop gains of any three pairwise nontouching loops Δk = the cofactor value of Δ for the kth forward path, with the loops touching the kth forward path removed. * Definitions Path: a continuous set of branches traversed in the direction that they indicate. Forward path: A path from an input node to an output node in which no node is touched more than once. Loop: A path that originates and ends on the same node in which no node is touched more than once. Path gain: the product of the gains of all the branches in the path. Loop gain: the product of the gains of all the branches in the loop. Procedure to find the solution Make a list of all forward paths, and their gains, and label these Gk. Make a list of all the loops and their gains, and label these Li (for i loops). Make a list of all pairs of non-touching loops, and the products of their gains (LiLj). Make a list of all pairwise non-touching loops taken three at