beta and beta matrix