A bracket assembly includes a first bracket and a second bracket. The first bracket includes a first support segment, a second support segment, and a third support segment. The first support segment has an upper portion and a lower portion. The second support segment extends in a first direction from the upper portion of the first support segment. The third support segment extends in the first direction from a portion of the first support segment that is adjacent to the lower portion of the first support segment. The first to the third support segments jointly define a support passage. The first bracket is used to support an object. The second bracket is mounted in the support passage of the first bracket.