LC medium comprising a low-molecular-weight, non-polymerisable liquid-crystalline component and a polymerisable or polymerised component comprising one or more polymerisable compounds of the formula I, where the polymerised component is obtainable by polymerisation of the polymerisable component, and where the LC medium comprises the compounds of the formula I in a concentration of ≤ 5% by weight, P-Sp-[A 3 -Z 3] m -[A 2] k -[Z 2] n -A 1 -R a in which A 1, A 2, A 3 in each case, independently of one another, denote an aromatic, heteroaromatic, alicyclic or heterocyclic group, which may also contain fused rings, and which may also be mono- or polysubstituted by a group L, L in each case, independently of one another, denotes H, F, Cl, Br, I, -CN, -NO 2, -NCO, -NCS, -OCN, -SCN, -C(=O)N(R 0) 2, -C(=O)R 0, optionally substituted silyl, optionally substituted aryl or cycloalkyl having 3 to 20 C atoms, or straight-chain or branched alkyl, alkoxy, alkylcarbonyl, alkoxycarbonyl, alkylcarbonyloxy or alkoxycarbonyloxy having 1 to 25 C atoms, in which, in addition, one or more H atoms may be replaced by F or Cl, P denotes a polymerisable group, Sp denotes a spacer group or a single bond, Z 2 in each case, independently of one another, denotes -O-, -S-, -CO-, -CO-O-, -OCO-, -O-CO-O-, -OCH 2 -, -CH 2 O-, -SCH 2 -, -CH 2 S-, -CF 2 O-, -OCF 2 -, -CF 2 S-, -SCF 2 -, -(CH 2) n1 -, -CF 2 CH 2 -, -CH 2 CF 2 -, -(CF 2) n1 -, -CH=CH-, -CF=CF-, -C≡C-, -CH=CH-COO-, -OCO-CH=CH-, -(CR 0 R 00) n1 -, Z 3 in each case, independently of one another, denotes a single bond, -O-, -S-, -CO-, -CO-O-, -OCO-, -O-CO-O-, -OCH 2 -, -CH 2 O-, -SCH 2 -, -CH 2 S-, -CF 2 O-, -OCF 2 -, -CF 2 S-, -SCF 2 -, -(CH 2) n1 -, -CF 2 CH 2 -, -CH 2 CF 2 -, -(CF 2) n1 -, -CH=CH-, -CF=CF-, -C≡C-, -CH=CH-COO-, -OCO-CH=CH-, -(CR 0 R 00) n1 -, n1 denotes 1, 2, 3 or 4, n denotes 0 or 1, m denotes 0, 1, 2, 3, 4, 5 or 6, k denotes 0 or 1, R 0 in each case, independently of one another, denotes alkyl having 1 to 12 C atoms, R 00 in each case, independently of one another, denotes H or alkyl having 1 to 12 C atoms, R a denotes an anchor group of the formula or p denotes 1 or 2, q denotes 2 or 3, B denotes a substituted or unsubstituted ring system or condensed ring system, Y, independently of one another, denotes -O-, -S-, -C -, -C O-, -OC -, -NR 11 - or a single bond, ο denotes 0 or 1, X 1, independently of one another, denotes H, alkyl, fluoroalkyl, OH, NH 2, NHR 11, NR 11 2, OR 11, C OH, -CHO, where at least one group X 1 denotes a radical selected from -OH, -NH 2, NHR 11, C OH and -CHO, R 11 denotes alkyl having 1 to 12 C atoms, Sp a, Sp c, Sp d in each case, independently of one another, denote a spacer group or a single bond, and Sp b denotes a tri- or tetravalent group. A 1, A 2, A 3 in each case, independently of one another, denote an aromatic, heteroaromatic, alicyclic or heterocyclic group, which may also contain fused rings, and which may also be mono- or polysubstituted by a group L, L in each case, independently of one another, denotes H, F, Cl, Br, I, -CN, -NO 2, -NCO, -NCS, -OCN, -SCN, -C(=O)N(R 0) 2, -C(=O)R 0, optionally substituted silyl, optionally substituted aryl or cycloalkyl having 3 to 20 C atoms, or straight-chain or branched alkyl, alkoxy, alkylcarbonyl, alkoxycarbonyl, alkylcarbonyloxy or alkoxycarbonyloxy having 1 to 25 C atoms, in which, in addition, one or more H atoms may be replaced by F or Cl, P denotes a polymerisable group, Sp denotes a spacer group or a single bond, Z 2 in each case, independently of one another, denotes -O-, -S-, -CO-, -CO-O-, -OCO-, -O-CO-O-, -OCH 2 -, -CH 2 O-, -SCH 2 -, -CH 2 S-, -CF 2 O-, -OCF 2 -, -CF 2 S-, -SCF 2 -, -(CH 2) n1 -, -CF 2 CH 2 -, -CH 2 CF 2 -, -(CF 2) n1 -, -CH=CH-, -CF=CF-, -C≡C-, -CH=CH-COO-, -OCO-CH=CH-, -(CR 0 R 00) n1 -, Z 3 in each case, independently of one another, denotes a single bond, -O-, -S-, -CO-, -CO-O-, -OCO-, -O-CO-O-, -OCH 2 -, -CH 2 O-, -SCH 2 -, -CH 2 S-, -CF 2 O-, -OCF 2 -, -CF 2 S-, -SCF 2 -, -(CH 2) n1 -, -CF 2 CH 2 -, -CH 2 CF 2 -, -(CF 2) n1 -, -CH=CH-, -CF=CF-, -C≡C-, -CH=CH-COO-, -OCO-CH=CH-, -(CR 0 R 00) n1 -, n1 denotes 1, 2, 3 or 4, n denotes 0 or 1, m denotes 0, 1, 2, 3, 4, 5 or 6, k denotes 0 or 1, R 0 in each case, independently of one another, denotes alkyl having 1 to 12 C atoms, R 00 in each case, independently of one another, denotes H or alkyl having 1 to 12 C atoms, R a denotes an anchor group of the formula or p denotes 1 or 2, q denotes 2 or 3, B denotes a substituted or unsubstituted ring system or condensed ring system, Y, independently of one another, denotes -O-, -S-, -C -, -C O-, -OC -, -NR 11 - or a single bond, ο denotes 0 or 1, X 1, independently of one another, denotes H, alkyl, fluoroalkyl, OH, NH 2, NHR 11, NR 11 2, OR 11, C OH, -CHO, where at least one group X 1 denotes a radical selected from -OH, -NH 2, NHR 11, C OH and -CHO, R 11 denotes alkyl having 1 to 12 C atoms, Sp a, Sp c, Sp d in each case, independently of one another, denote a spacer group or a single bond, and Sp b denotes a tri- or tetravalent group.