Graph complexity measures like tree-width, clique-width, NLC-width and rank-width are important because they yield Fixed Parameter Tractable algorithms. Rank-width is based on ranks of adjacency matrices of graphs over GF(2). We propose here algebraic operations on graphs that characterize rank-width. For algorithmic purposes, it is important to represent graphs by balanced terms. We give a unique theorem that generalizes several "balancing theorems" for tree-width and clique-width. New results are obtained for rank-width and a variant of clique-width, called m-clique-width.