There are a number of data formats for representing phylogenetic or other kinds of trees. Perhaps the most common one, which shall be discussed here exemplarily, is Newick. It uses brackets in quite an intuitive way. Representation on various levels of detail are possible. For example, the two strings
(A, (B, (C, D)));
Fig. 1: Left: A tree without edge lengths. Right: A tree with edges drawn proportional to their lengths. The edge lengths are also shown as numbers. (The figures were drawn using the program FigTree.)
If the tree is unrooted, an arbitrary node is chosen to be used first. Any node may be specified as root in the tree in this format. The format uses the file extension .nwk. It is used for instance in Phylip, MrBayes and PAUP*.