In this work we analyze the relationship between the patterns of firm diversification, if any, across product lines and across bodies of innovative knowledge, proxied by the patent classes where the firm is present. Putting it more emphatically we investigate the relationship between "what a firm does" and "what a firm knows". Using a newly developed dataset matching information on patents and products at the firm level, we provide evidence concerning firms' technological and product scope, their relationships, the size-scaling and coherence properties of diversification itself. Our analysis shows that typically firms are much more diversified in terms of products than in terms of technologies, with their main products more related to the exploitation of their innovative knowledge. The scaling properties show that the number of products and technologies increase log-linearly with firm size. And the directions of diversification themselves display coherence between neighboring activities also at relatively high degrees of diversification. These findings are well in tune with a capability-based theory of the firm.JEL codes: C81, D22, L20, L25, O31