# Abstract Algebra question

## Homework Statement

Let G=<x, y| x^{2n}=e, x^n=y^2, xy=yx^{-1}>. Show Z(G)={e, x^n}.

## The Attempt at a Solution

So I tried breaking this up into cases:
Case 1: If n=1. then |x|=1 or 2. If |x|=1, then x=e and x would obviously be in the center.
If |x|=2, then xy=yx (since (y^-1)xy=x^-1 and x^-1 = x when |x|=2). Thus G is abelain, and Z(G) would be {e,x,y^2} but since y^2=x, are Z(G) would be {e,x}.
Case 2. n>1
If n>1 and the order of x>2, then xx^(n)=x^(n+1)=x^(n)x and x^(n)y=y^2y=y^3=yy^2=yx^n. Since x^n commutes with the generates of G, x^n commutes with all of G. But G is not abelain, because if it were, y^-1xy=y^-1yx=x=x^-1, which is not true when |x|>2. Thus, the only elements in Z(G) are {e,x^n}