A base station apparatus configured to communicate with a terminal apparatus , the base station apparatus comprising: a transmitter configured to transmit an EPDCCH, Enhanced Physical Downlink Control Channel, by using either a distributed transmission or a localized transmission, wherein the EPDCCH is transmitted using one or a plurality of ECCEs, Enhanced Control Channel elements; each of the ECCEs consists of a plurality of EREGs, Enhanced Resource Element Groups; each of the EREGs is constituted by a plurality of resource elements in a resource block pair; in a first case that the EPDCCH is transmitted by using the localized transmission, the EPDCCH is associated with an antenna port, the antenna port is determined from antenna ports 107 to 110 based on an ECCE number of an ECCE among the one or plurality of ECCEs; and in a second case that the EPDCCH is transmitted by using the distributed transmission, each of the resource elements in each of the EREGs is associated with one out of two antenna ports in an alternating manner; wherein, the two antenna ports for the distributed transmission of the EPDCCH are antenna port 107 and an antenna port 109; a reference signal among a first group of reference signals is transmitted via the antenna port 107, the reference signal transmitted via the antenna port 107 being used for demodulating the EPDCCH transmitted by using the distributed transmission; a reference signal among a second group of reference signals is transmitted via the antenna port 109, the reference signal transmitted via the antenna port 109 being used for demodulating the EPDCCH transmitted by using the distributed transmission; reference signals included in the first group are mapped to a first resource element set; reference signals included in the second group are mapped to a second resource element set; the first resource element set is different from the second resource element set; and the first group is a group to which a first Walsh code applies; and the second group is a group to which a second Walsh code applies. a transmitter configured to transmit an EPDCCH, Enhanced Physical Downlink Control Channel, by using either a distributed transmission or a localized transmission, wherein the EPDCCH is transmitted using one or a plurality of ECCEs, Enhanced Control Channel elements; each of the ECCEs consists of a plurality of EREGs, Enhanced Resource Element Groups; each of the EREGs is constituted by a plurality of resource elements in a resource block pair; in a first case that the EPDCCH is transmitted by using the localized transmission, the EPDCCH is associated with an antenna port, the antenna port is determined from antenna ports 107 to 110 based on an ECCE number of an ECCE among the one or plurality of ECCEs; and in a second case that the EPDCCH is transmitted by using the distributed transmission, each of the resource elements in each of the EREGs is associated with one out of two antenna ports in an alternating manner; wherein, the two antenna ports for the distributed transmission of the EPDCCH are antenna port 107 and an antenna port 109; a reference signal among a first group of reference signals is transmitted via the antenna port 107, the reference signal transmitted via the antenna port 107 being used for demodulating the EPDCCH transmitted by using the distributed transmission; a reference signal among a second group of reference signals is transmitted via the antenna port 109, the reference signal transmitted via the antenna port 109 being used for demodulating the EPDCCH transmitted by using the distributed transmission; reference signals included in the first group are mapped to a first resource element set; reference signals included in the second group are mapped to a second resource element set; the first resource element set is different from the second resource element set; <EOS>